[#859] config: rename shallow_* to width and depth

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-18 17:20:03 +03:00 committed by Alex Vanin
parent 684e3e0ae0
commit c015b04ed5
7 changed files with 25 additions and 25 deletions

View file

@ -44,13 +44,13 @@ func (x *Config) Size() uint64 {
return SizeDefault
}
// ShallowDepth returns value of "shallow_depth" config parameter.
// ShallowDepth returns value of "depth" config parameter.
//
// Returns ShallowDepthDefault if value is not a positive number.
func (x *Config) ShallowDepth() uint64 {
d := config.UintSafe(
(*config.Config)(x),
"shallow_depth",
"depth",
)
if d > 0 {
@ -60,13 +60,13 @@ func (x *Config) ShallowDepth() uint64 {
return ShallowDepthDefault
}
// ShallowWidth returns value of "shallow_width" config parameter.
// ShallowWidth returns value of "width" config parameter.
//
// Returns ShallowWidthDefault if value is not a positive number.
func (x *Config) ShallowWidth() uint64 {
d := config.UintSafe(
(*config.Config)(x),
"shallow_width",
"width",
)
if d > 0 {

View file

@ -61,14 +61,14 @@ func (x *Config) Perm() fs.FileMode {
return fs.FileMode(p)
}
// ShallowDepth returns value of "shallow_depth" config parameter.
// ShallowDepth returns value of "depth" config parameter.
//
// Returns ShallowDepthDefault if value is out of
// [1:fstree.MaxDepth] range.
func (x *Config) ShallowDepth() int {
d := config.IntSafe(
(*config.Config)(x),
"shallow_depth",
"depth",
)
if d >= 1 && d <= fstree.MaxDepth {

View file

@ -85,12 +85,12 @@ NEOFS_STORAGE_SHARD_0_METABASE_PERM=0644
NEOFS_STORAGE_SHARD_0_BLOBSTOR_PATH=tmp/0/blob
NEOFS_STORAGE_SHARD_0_BLOBSTOR_PERM=0644
NEOFS_STORAGE_SHARD_0_BLOBSTOR_COMPRESS=true
NEOFS_STORAGE_SHARD_0_BLOBSTOR_SHALLOW_DEPTH=5
NEOFS_STORAGE_SHARD_0_BLOBSTOR_DEPTH=5
NEOFS_STORAGE_SHARD_0_BLOBSTOR_SMALL_OBJECT_SIZE=102400
### Blobovnicza config
NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_SIZE=4194304
NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_SHALLOW_DEPTH=1
NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_SHALLOW_WIDTH=4
NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_DEPTH=1
NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_WIDTH=4
NEOFS_STORAGE_SHARD_0_BLOBSTOR_BLOBOVNICZA_OPENED_CACHE_CAPACITY=50
### GC config
#### Limit of the single data remover's batching operation in number of objects
@ -116,12 +116,12 @@ NEOFS_STORAGE_SHARD_1_METABASE_PERM=0644
NEOFS_STORAGE_SHARD_1_BLOBSTOR_PATH=tmp/1/blob
NEOFS_STORAGE_SHARD_1_BLOBSTOR_PERM=0644
NEOFS_STORAGE_SHARD_1_BLOBSTOR_COMPRESS=false
NEOFS_STORAGE_SHARD_1_BLOBSTOR_SHALLOW_DEPTH=5
NEOFS_STORAGE_SHARD_1_BLOBSTOR_DEPTH=5
NEOFS_STORAGE_SHARD_1_BLOBSTOR_SMALL_OBJECT_SIZE=102400
### Blobovnicza config
NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_SIZE=4194304
NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_SHALLOW_DEPTH=1
NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_SHALLOW_WIDTH=4
NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_DEPTH=1
NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_WIDTH=4
NEOFS_STORAGE_SHARD_1_BLOBSTOR_BLOBOVNICZA_OPENED_CACHE_CAPACITY=50
### GC config
#### Limit of the single data remover's batching operation in number of objects

View file

@ -119,12 +119,12 @@
"path": "tmp/0/blob",
"perm": "0644",
"compress": true,
"shallow_depth": 5,
"depth": 5,
"small_object_size": 102400,
"blobovnicza": {
"size": 4194304,
"shallow_depth": 1,
"shallow_width": 4,
"depth": 1,
"width": 4,
"opened_cache_capacity": 50
}
},
@ -152,12 +152,12 @@
"path": "tmp/1/blob",
"perm": "0644",
"compress": false,
"shallow_depth": 5,
"depth": 5,
"small_object_size": 102400,
"blobovnicza": {
"size": 4194304,
"shallow_depth": 1,
"shallow_width": 4,
"depth": 1,
"width": 4,
"opened_cache_capacity": 50
}
},

View file

@ -104,13 +104,13 @@ storage:
blobstor:
compress: false # turn on/off zstd(level 3) compression of stored objects
perm: 0644 # permissions for blobstor files(directories: +x for current user and group)
shallow_depth: 5 # max depth of object tree storage in FS
depth: 5 # max depth of object tree storage in FS
small_object_size: 102400 # size threshold for "small" objects which are cached in key-value DB, not in FS, bytes
blobovnicza:
size: 4194304 # approximate size limit of single blobovnicza instance, total size will be: size*width^(depth+1), bytes
shallow_depth: 1 # max depth of object tree storage in key-value DB
shallow_width: 4 # max width of object tree storage in key-value DB
depth: 1 # max depth of object tree storage in key-value DB
width: 4 # max width of object tree storage in key-value DB
opened_cache_capacity: 50 # maximum number of opened database files
gc:

View file

@ -29,8 +29,8 @@ storage:
perm: 0600
blobovnicza:
opened_cache_capacity: 32
shallow_depth: 1
shallow_width: 1
depth: 1
width: 1
gc:
remover_batch_size: 100
remover_sleep_interval: 1m

View file

@ -48,8 +48,8 @@ storage:
perm: 0777
blobovnicza:
opened_cache_capacity: 32
shallow_depth: 1
shallow_width: 1
depth: 1
width: 1
gc:
remover_batch_size: 100
remover_sleep_interval: 1m