[#1579] config: Move storage.default to shard.default

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-13 11:52:53 +03:00 committed by fyrchik
parent 0ab168a00a
commit 1119014e53
2 changed files with 32 additions and 31 deletions

View file

@ -24,8 +24,8 @@ const (
func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config)) { func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config)) {
c = c.Sub(subsection) c = c.Sub(subsection)
def := c.Sub("default")
c = c.Sub("shard") c = c.Sub("shard")
def := c.Sub("default")
i := uint64(0) i := uint64(0)
for ; ; i++ { for ; ; i++ {

View file

@ -104,6 +104,8 @@ storage:
# note: shard configuration can be omitted for relay node (see `node.relay`) # note: shard configuration can be omitted for relay node (see `node.relay`)
shard_pool_size: 15 # size of per-shard worker pools used for PUT operations shard_pool_size: 15 # size of per-shard worker pools used for PUT operations
shard_ro_error_threshold: 100 # amount of errors to occur before shard is made read-only (default: 0, ignore errors) shard_ro_error_threshold: 100 # amount of errors to occur before shard is made read-only (default: 0, ignore errors)
shard:
default: # section with the default shard parameters default: # section with the default shard parameters
resync_metabase: true # sync metabase with blobstor on start, expensive, leave false until complete understanding resync_metabase: true # sync metabase with blobstor on start, expensive, leave false until complete understanding
@ -135,7 +137,6 @@ storage:
remover_batch_size: 200 # number of objects to be removed by the garbage collector remover_batch_size: 200 # number of objects to be removed by the garbage collector
remover_sleep_interval: 5m # frequency of the garbage collector invocation remover_sleep_interval: 5m # frequency of the garbage collector invocation
shard:
0: 0:
mode: "read-only" # mode of the shard, must be one of the: "read-write" (default), "read-only" mode: "read-only" # mode of the shard, must be one of the: "read-write" (default), "read-only"
resync_metabase: false # sync metabase with blobstor on start, expensive, leave false until complete understanding resync_metabase: false # sync metabase with blobstor on start, expensive, leave false until complete understanding