[#1745] writecache: Simplify object counters
Remove unused option and additional pointers to db/fstree. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
20abdaeed4
commit
bda084f331
3 changed files with 8 additions and 59 deletions
|
@ -31,8 +31,8 @@ type options struct {
|
|||
// maxCacheSize is the maximum total size of all objects saved in cache (DB + FS).
|
||||
// 1 GiB by default.
|
||||
maxCacheSize uint64
|
||||
// objCounters is an ObjectCounters instance needed for cache size estimation.
|
||||
objCounters ObjectCounters
|
||||
// objCounters contains atomic counters for the number of objects stored in cache.
|
||||
objCounters counters
|
||||
// maxBatchSize is the maximum batch size for the small object database.
|
||||
maxBatchSize int
|
||||
// maxBatchDelay is the maximum batch wait time for the small object database.
|
||||
|
@ -100,13 +100,6 @@ func WithFlushWorkersCount(c int) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithObjectCounters sets ObjectCounters instance needed for cache write-cache size estimation.
|
||||
func WithObjectCounters(v ObjectCounters) Option {
|
||||
return func(o *options) {
|
||||
o.objCounters = v
|
||||
}
|
||||
}
|
||||
|
||||
// WithMaxCacheSize sets maximum write-cache size in bytes.
|
||||
func WithMaxCacheSize(sz uint64) Option {
|
||||
return func(o *options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue