From a180f09523f0728ae4a67a97816c5d8e34af336b Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 18 Oct 2021 17:12:03 +0300 Subject: [PATCH] [#859] config: rename `max_size` to `max_object_size` `_size` suffix by itself makes me think about restrictions on database size. Signed-off-by: Evgenii Stratonikov --- cmd/neofs-node/config/engine/shard/writecache/config.go | 4 ++-- config/example/node.env | 4 ++-- config/example/node.json | 4 ++-- config/example/node.yaml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/neofs-node/config/engine/shard/writecache/config.go b/cmd/neofs-node/config/engine/shard/writecache/config.go index 4cf348a9..b782b970 100644 --- a/cmd/neofs-node/config/engine/shard/writecache/config.go +++ b/cmd/neofs-node/config/engine/shard/writecache/config.go @@ -79,13 +79,13 @@ func (x *Config) SmallObjectSize() uint64 { return SmallSizeDefault } -// MaxObjectSize returns value of "max_size" config parameter. +// MaxObjectSize returns value of "max_object_size" config parameter. // // Returns MaxSizeDefault if value is not a positive number. func (x *Config) MaxObjectSize() uint64 { s := config.SizeInBytesSafe( (*config.Config)(x), - "max_size", + "max_object_size", ) if s > 0 { diff --git a/config/example/node.env b/config/example/node.env index dd9758ac..98b9594d 100644 --- a/config/example/node.env +++ b/config/example/node.env @@ -75,7 +75,7 @@ NEOFS_STORAGE_SHARD_0_USE_WRITE_CACHE=false NEOFS_STORAGE_SHARD_0_WRITECACHE_PATH=tmp/0/cache NEOFS_STORAGE_SHARD_0_WRITECACHE_MEM_SIZE=2147483648 NEOFS_STORAGE_SHARD_0_WRITECACHE_SMALL_OBJECT_SIZE=16384 -NEOFS_STORAGE_SHARD_0_WRITECACHE_MAX_SIZE=134217728 +NEOFS_STORAGE_SHARD_0_WRITECACHE_MAX_OBJECT_SIZE=134217728 NEOFS_STORAGE_SHARD_0_WRITECACHE_WORKERS_NUMBER=30 NEOFS_STORAGE_SHARD_0_WRITECACHE_SIZE_LIMIT=3221225472 ### Metabase config @@ -106,7 +106,7 @@ NEOFS_STORAGE_SHARD_1_USE_WRITE_CACHE=true NEOFS_STORAGE_SHARD_1_WRITECACHE_PATH=tmp/1/cache NEOFS_STORAGE_SHARD_1_WRITECACHE_MEM_SIZE=2147483648 NEOFS_STORAGE_SHARD_1_WRITECACHE_SMALL_OBJECT_SIZE=16384 -NEOFS_STORAGE_SHARD_1_WRITECACHE_MAX_SIZE=134217728 +NEOFS_STORAGE_SHARD_1_WRITECACHE_MAX_OBJECT_SIZE=134217728 NEOFS_STORAGE_SHARD_1_WRITECACHE_WORKERS_NUMBER=30 NEOFS_STORAGE_SHARD_1_WRITECACHE_SIZE_LIMIT=4294967296 ### Metabase config diff --git a/config/example/node.json b/config/example/node.json index 82e0d3b2..86ec7601 100644 --- a/config/example/node.json +++ b/config/example/node.json @@ -107,7 +107,7 @@ "path": "tmp/0/cache", "mem_size": 2147483648, "small_object_size": 16384, - "max_size": 134217728, + "max_object_size": 134217728, "workers_number": 30, "size_limit": 3221225472 }, @@ -140,7 +140,7 @@ "path": "tmp/1/cache", "mem_size": 2147483648, "small_object_size": 16384, - "max_size": 134217728, + "max_object_size": 134217728, "workers_number": 30, "size_limit": 4294967296 }, diff --git a/config/example/node.yaml b/config/example/node.yaml index e322f4ee..366df83d 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -95,7 +95,7 @@ storage: writecache: mem_size: 2147483648 # approximate RAM usage limit for "small" objects, bytes small_object_size: 16384 # size threshold for "small" objects which are cached in key-value DB, not in FS, bytes - max_size: 134217728 # size threshold for "big" objects which bypass write-cache and go to the storage directly, bytes + max_object_size: 134217728 # size threshold for "big" objects which bypass write-cache and go to the storage directly, bytes workers_number: 30 # number of write-cache flusher threads metabase: