forked from TrueCloudLab/frostfs-node
[#1549] shard: Turn to read-only mode on metabase failure
If metabase can't be opened in the default mode, try opening shard first in `ReadOnly` mode and then in `DegradedReadOnly`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru> Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
4944490ffb
commit
fabe717d32
3 changed files with 122 additions and 12 deletions
|
@ -123,5 +123,8 @@ func (db *DB) init(reset bool) error {
|
|||
|
||||
// Close closes boltDB instance.
|
||||
func (db *DB) Close() error {
|
||||
return db.boltDB.Close()
|
||||
if db.boltDB != nil {
|
||||
return db.boltDB.Close()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue