From e9c6ee262348859e39927cf61512d2e171e646d3 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 1 Sep 2022 09:08:28 +0300 Subject: [PATCH] [#1745] writecache: Rename constants for default values Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/writecache/writecache.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/local_object_storage/writecache/writecache.go b/pkg/local_object_storage/writecache/writecache.go index c26be5ea15..c3ed2738d0 100644 --- a/pkg/local_object_storage/writecache/writecache.go +++ b/pkg/local_object_storage/writecache/writecache.go @@ -66,9 +66,9 @@ type objectInfo struct { } const ( - maxObjectSize = 64 * 1024 * 1024 // 64 MiB - smallObjectSize = 32 * 1024 // 32 KiB - maxCacheSizeBytes = 1 << 30 // 1 GiB + defaultMaxObjectSize = 64 * 1024 * 1024 // 64 MiB + defaultSmallObjectSize = 32 * 1024 // 32 KiB + defaultMaxCacheSize = 1 << 30 // 1 GiB ) var ( @@ -84,10 +84,10 @@ func New(opts ...Option) Cache { compressFlags: make(map[string]struct{}), options: options{ log: zap.NewNop(), - maxObjectSize: maxObjectSize, - smallObjectSize: smallObjectSize, + maxObjectSize: defaultMaxObjectSize, + smallObjectSize: defaultSmallObjectSize, workersCount: defaultFlushWorkersCount, - maxCacheSize: maxCacheSizeBytes, + maxCacheSize: defaultMaxCacheSize, maxBatchSize: bbolt.DefaultMaxBatchSize, maxBatchDelay: bbolt.DefaultMaxBatchDelay, },