WIP: Change metabase engine to pebble #1221

Closed
dstepanov-yadro wants to merge 28 commits from dstepanov-yadro/frostfs-node:feat/pebble_metabase into master
Showing only changes of commit 343662773f - Show all commits

View file

@ -1,8 +1,10 @@
package meta
import (
"context"
"fmt"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/metaerr"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
)
@ -17,7 +19,7 @@ func (db *DB) SetMode(m mode.Mode) error {
}
if !db.mode.NoMetabase() {
if err := db.Close(); err != nil {
if err := db.close(); err != nil {
return fmt.Errorf("can't set metabase mode (old=%s, new=%s): %w", db.mode, m, err)
}
}
@ -27,7 +29,7 @@ func (db *DB) SetMode(m mode.Mode) error {
} else {
err := db.openDB(m)
if err == nil && !m.ReadOnly() {
err = db.Init()
err = metaerr.Wrap(db.init(context.TODO(), false))
}
if err != nil {
return fmt.Errorf("can't set metabase mode (old=%s, new=%s): %w", db.mode, m, err)