From d938c7267bd270b650d4d52d7dc1ea57c6e1d708 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 13 Sep 2021 16:58:37 +0300 Subject: [PATCH] [#789] node/config: Add Shard's `refill_metabase` config to examples Signed-off-by: Leonard Lyubich --- cmd/neofs-node/config/engine/config_test.go | 4 ++++ config/example/node.env | 4 ++++ config/example/node.json | 2 ++ config/example/node.yaml | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/cmd/neofs-node/config/engine/config_test.go b/cmd/neofs-node/config/engine/config_test.go index e5454cb432..e84f591b7d 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 7676c12ffe..bf8945492e 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 f26ea05bc5..a6396ce681 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 2a22ef5857..5feb5e664c 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: