[#859] config: rename writecache.size_limit to writecache.capacity

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-18 17:29:30 +03:00 committed by Alex Vanin
parent c015b04ed5
commit e7fd980951
4 changed files with 8 additions and 8 deletions

View file

@ -111,13 +111,13 @@ func (x *Config) WorkersNumber() int {
return WorkersNumberDefault return WorkersNumberDefault
} }
// SizeLimit returns value of "size_limit" config parameter. // SizeLimit returns value of "capacity" config parameter.
// //
// Returns SizeLimitDefault if value is not a positive number. // Returns SizeLimitDefault if value is not a positive number.
func (x *Config) SizeLimit() uint64 { func (x *Config) SizeLimit() uint64 {
c := config.SizeInBytesSafe( c := config.SizeInBytesSafe(
(*config.Config)(x), (*config.Config)(x),
"size_limit", "capacity",
) )
if c > 0 { if c > 0 {

View file

@ -77,7 +77,7 @@ NEOFS_STORAGE_SHARD_0_WRITECACHE_MEMCACHE_CAPACITY=2147483648
NEOFS_STORAGE_SHARD_0_WRITECACHE_SMALL_OBJECT_SIZE=16384 NEOFS_STORAGE_SHARD_0_WRITECACHE_SMALL_OBJECT_SIZE=16384
NEOFS_STORAGE_SHARD_0_WRITECACHE_MAX_OBJECT_SIZE=134217728 NEOFS_STORAGE_SHARD_0_WRITECACHE_MAX_OBJECT_SIZE=134217728
NEOFS_STORAGE_SHARD_0_WRITECACHE_WORKERS_NUMBER=30 NEOFS_STORAGE_SHARD_0_WRITECACHE_WORKERS_NUMBER=30
NEOFS_STORAGE_SHARD_0_WRITECACHE_SIZE_LIMIT=3221225472 NEOFS_STORAGE_SHARD_0_WRITECACHE_CAPACITY=3221225472
### Metabase config ### Metabase config
NEOFS_STORAGE_SHARD_0_METABASE_PATH=tmp/0/meta NEOFS_STORAGE_SHARD_0_METABASE_PATH=tmp/0/meta
NEOFS_STORAGE_SHARD_0_METABASE_PERM=0644 NEOFS_STORAGE_SHARD_0_METABASE_PERM=0644
@ -108,7 +108,7 @@ NEOFS_STORAGE_SHARD_1_WRITECACHE_MEMCACHE_CAPACITY=2147483648
NEOFS_STORAGE_SHARD_1_WRITECACHE_SMALL_OBJECT_SIZE=16384 NEOFS_STORAGE_SHARD_1_WRITECACHE_SMALL_OBJECT_SIZE=16384
NEOFS_STORAGE_SHARD_1_WRITECACHE_MAX_OBJECT_SIZE=134217728 NEOFS_STORAGE_SHARD_1_WRITECACHE_MAX_OBJECT_SIZE=134217728
NEOFS_STORAGE_SHARD_1_WRITECACHE_WORKERS_NUMBER=30 NEOFS_STORAGE_SHARD_1_WRITECACHE_WORKERS_NUMBER=30
NEOFS_STORAGE_SHARD_1_WRITECACHE_SIZE_LIMIT=4294967296 NEOFS_STORAGE_SHARD_1_WRITECACHE_CAPACITY=4294967296
### Metabase config ### Metabase config
NEOFS_STORAGE_SHARD_1_METABASE_PATH=tmp/1/meta NEOFS_STORAGE_SHARD_1_METABASE_PATH=tmp/1/meta
NEOFS_STORAGE_SHARD_1_METABASE_PERM=0644 NEOFS_STORAGE_SHARD_1_METABASE_PERM=0644

View file

@ -109,7 +109,7 @@
"small_object_size": 16384, "small_object_size": 16384,
"max_object_size": 134217728, "max_object_size": 134217728,
"workers_number": 30, "workers_number": 30,
"size_limit": 3221225472 "capacity": 3221225472
}, },
"metabase": { "metabase": {
"path": "tmp/0/meta", "path": "tmp/0/meta",
@ -142,7 +142,7 @@
"small_object_size": 16384, "small_object_size": 16384,
"max_object_size": 134217728, "max_object_size": 134217728,
"workers_number": 30, "workers_number": 30,
"size_limit": 4294967296 "capacity": 4294967296
}, },
"metabase": { "metabase": {
"path": "tmp/1/meta", "path": "tmp/1/meta",

View file

@ -125,7 +125,7 @@ storage:
writecache: writecache:
path: tmp/0/cache # write-cache root directory path: tmp/0/cache # write-cache root directory
size_limit: 3221225472 # approximate write-cache total size, bytes capacity: 3221225472 # approximate write-cache total size, bytes
metabase: metabase:
path: tmp/0/meta # metabase path path: tmp/0/meta # metabase path
@ -141,7 +141,7 @@ storage:
1: 1:
writecache: writecache:
path: tmp/1/cache # write-cache root directory path: tmp/1/cache # write-cache root directory
size_limit: 4294967296 # approximate write-cache total size, bytes capacity: 4294967296 # approximate write-cache total size, bytes
metabase: metabase:
path: tmp/1/meta # metabase path path: tmp/1/meta # metabase path