forked from TrueCloudLab/frostfs-node
[#949] metabase: fix metabase mode metric
It used to always show CLOSED regardless of actual mode. Now metric represents actual metabase mode of operations. Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
parent
e12fcc041d
commit
81a0346a96
1 changed files with 1 additions and 0 deletions
|
@ -42,6 +42,7 @@ func (db *DB) Open(_ context.Context, mode mode.Mode) error {
|
|||
db.modeMtx.Lock()
|
||||
defer db.modeMtx.Unlock()
|
||||
db.mode = mode
|
||||
db.metrics.SetMode(mode)
|
||||
|
||||
if mode.NoMetabase() {
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue