forked from TrueCloudLab/frostfs-node
[#959] node: Set mode to shard's components when open it
Avoid opening database for `metabase` and `cache` in `Degraded` mode. Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
60527abb65
commit
d19ade23c8
25 changed files with 219 additions and 74 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"sync/atomic"
|
||||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||||
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -26,7 +27,7 @@ func BenchmarkCreate(b *testing.B) {
|
|||
f := NewBoltForest(
|
||||
WithPath(filepath.Join(tmpDir, "test.db")),
|
||||
WithMaxBatchSize(runtime.GOMAXPROCS(0)))
|
||||
require.NoError(b, f.Open(context.Background(), false))
|
||||
require.NoError(b, f.Open(context.Background(), mode.ReadWrite))
|
||||
require.NoError(b, f.Init())
|
||||
defer func() { require.NoError(b, f.Close()) }()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue