forked from TrueCloudLab/frostfs-node
[#1437] shard: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c139892117
commit
16598553d9
38 changed files with 165 additions and 160 deletions
|
@ -1,6 +1,7 @@
|
|||
package meta
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||||
|
@ -8,7 +9,7 @@ import (
|
|||
|
||||
// SetMode sets the metabase mode of operation.
|
||||
// If the mode assumes no operation metabase, the database is closed.
|
||||
func (db *DB) SetMode(m mode.Mode) error {
|
||||
func (db *DB) SetMode(ctx context.Context, m mode.Mode) error {
|
||||
db.modeMtx.Lock()
|
||||
defer db.modeMtx.Unlock()
|
||||
|
||||
|
@ -25,7 +26,7 @@ func (db *DB) SetMode(m mode.Mode) error {
|
|||
if m.NoMetabase() {
|
||||
db.boltDB = nil
|
||||
} else {
|
||||
err := db.openDB(m)
|
||||
err := db.openDB(ctx, m)
|
||||
if err == nil && !m.ReadOnly() {
|
||||
err = db.Init()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue