forked from TrueCloudLab/frostfs-node
[#776] cmd/node: Configure write-cache size limit
Add `size_limit` config value to write-cache section. Add `SizeLimit` method of `writecache.Config` type. Pass its value to `WithMaxCacheSize` option on app construction. Reflect config update in examples. Cover new value in unit test. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
a1696a81b6
commit
368e280413
6 changed files with 30 additions and 2 deletions
|
@ -369,6 +369,7 @@ func initShardOptions(c *cfg) {
|
|||
writecache.WithMaxObjectSize(writeCacheCfg.MaxObjectSize()),
|
||||
writecache.WithSmallObjectSize(writeCacheCfg.SmallObjectSize()),
|
||||
writecache.WithFlushWorkersCount(writeCacheCfg.WorkersNumber()),
|
||||
writecache.WithMaxCacheSize(writeCacheCfg.SizeLimit()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue