diff --git a/cmd/neofs-node/config/engine/config_test.go b/cmd/neofs-node/config/engine/config_test.go index e5454cb43..e84f591b7 100644 --- a/cmd/neofs-node/config/engine/config_test.go +++ b/cmd/neofs-node/config/engine/config_test.go @@ -62,6 +62,8 @@ func TestEngineSection(t *testing.T) { require.EqualValues(t, 150, gc.RemoverBatchSize()) require.Equal(t, 2*time.Minute, gc.RemoverSleepInterval()) + + require.Equal(t, false, sc.RefillMetabase()) case 1: require.Equal(t, true, sc.UseWriteCache()) @@ -88,6 +90,8 @@ func TestEngineSection(t *testing.T) { require.EqualValues(t, 200, gc.RemoverBatchSize()) require.Equal(t, 5*time.Minute, gc.RemoverSleepInterval()) + + require.Equal(t, true, sc.RefillMetabase()) } }) diff --git a/config/example/node.env b/config/example/node.env index 7676c12ff..bf8945492 100644 --- a/config/example/node.env +++ b/config/example/node.env @@ -69,6 +69,8 @@ NEOFS_OBJECT_PUT_POOL_SIZE=100 # Storage engine section NEOFS_STORAGE_SHARD_NUM=2 ## 0 shard +### Flag to refill Metabase from BlobStor +NEOFS_STORAGE_SHARD_0_REFILL_METABASE=false ### Write cache config NEOFS_STORAGE_SHARD_0_USE_WRITE_CACHE=false NEOFS_STORAGE_SHARD_0_WRITECACHE_PATH=tmp/0/cache @@ -98,6 +100,8 @@ NEOFS_STORAGE_SHARD_0_GC_REMOVER_BATCH_SIZE=150 NEOFS_STORAGE_SHARD_0_GC_REMOVER_SLEEP_INTERVAL=2m ## 1 shard +### Flag to refill Metabase from BlobStor +NEOFS_STORAGE_SHARD_1_REFILL_METABASE=true ### Write cache config NEOFS_STORAGE_SHARD_1_USE_WRITE_CACHE=true NEOFS_STORAGE_SHARD_1_WRITECACHE_PATH=tmp/1/cache diff --git a/config/example/node.json b/config/example/node.json index f26ea05bc..a6396ce68 100644 --- a/config/example/node.json +++ b/config/example/node.json @@ -104,6 +104,7 @@ "shard_num": 2, "shard": { "0": { + "refill_metabase": false, "use_write_cache": false, "writecache": { "path": "tmp/0/cache", @@ -136,6 +137,7 @@ } }, "1": { + "refill_metabase": true, "use_write_cache": true, "writecache": { "path": "tmp/1/cache", diff --git a/config/example/node.yaml b/config/example/node.yaml index 2a22ef585..5feb5e664 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -90,6 +90,8 @@ storage: shard_num: 2 shard: 0: + refill_metabase: false + use_write_cache: false writecache: @@ -122,6 +124,8 @@ storage: remover_sleep_interval: 2m 1: + refill_metabase: true + use_write_cache: true writecache: