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()
|
db.modeMtx.Lock()
|
||||||
defer db.modeMtx.Unlock()
|
defer db.modeMtx.Unlock()
|
||||||
db.mode = mode
|
db.mode = mode
|
||||||
|
db.metrics.SetMode(mode)
|
||||||
|
|
||||||
if mode.NoMetabase() {
|
if mode.NoMetabase() {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue