[#1745] writecache: Rename constants for default values

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-09-01 09:08:28 +03:00 committed by fyrchik
parent 177e8e01b1
commit e9c6ee2623

View file

@ -66,9 +66,9 @@ type objectInfo struct {
} }
const ( const (
maxObjectSize = 64 * 1024 * 1024 // 64 MiB defaultMaxObjectSize = 64 * 1024 * 1024 // 64 MiB
smallObjectSize = 32 * 1024 // 32 KiB defaultSmallObjectSize = 32 * 1024 // 32 KiB
maxCacheSizeBytes = 1 << 30 // 1 GiB defaultMaxCacheSize = 1 << 30 // 1 GiB
) )
var ( var (
@ -84,10 +84,10 @@ func New(opts ...Option) Cache {
compressFlags: make(map[string]struct{}), compressFlags: make(map[string]struct{}),
options: options{ options: options{
log: zap.NewNop(), log: zap.NewNop(),
maxObjectSize: maxObjectSize, maxObjectSize: defaultMaxObjectSize,
smallObjectSize: smallObjectSize, smallObjectSize: defaultSmallObjectSize,
workersCount: defaultFlushWorkersCount, workersCount: defaultFlushWorkersCount,
maxCacheSize: maxCacheSizeBytes, maxCacheSize: defaultMaxCacheSize,
maxBatchSize: bbolt.DefaultMaxBatchSize, maxBatchSize: bbolt.DefaultMaxBatchSize,
maxBatchDelay: bbolt.DefaultMaxBatchDelay, maxBatchDelay: bbolt.DefaultMaxBatchDelay,
}, },