[#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 <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-18 17:12:03 +03:00 committed by Alex Vanin
parent da51c119d5
commit a180f09523
4 changed files with 7 additions and 7 deletions

View file

@ -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 {

View file

@ -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

View file

@ -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
},

View file

@ -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: