From a2dddbbcbb7dd358915effe2587933b5cc8e47a6 Mon Sep 17 00:00:00 2001 From: mokhotskii Date: Fri, 8 Apr 2022 01:10:18 +0300 Subject: LOGBROKER-7405 Fix l2 cache issue Fix cache size in l2 cache After refactoring 1024^2 MB provided to function that accepted MB values was replaced with 1 MB. This change fixes 1_MB with 1_TB. ref:da3eeb7ecbeeab15b8984866120bb153f9cfc7a9 --- ydb/core/persqueue/pq_l2_cache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/core/persqueue/pq_l2_cache.h b/ydb/core/persqueue/pq_l2_cache.h index 468da5f569c..2ec6e97cedd 100644 --- a/ydb/core/persqueue/pq_l2_cache.h +++ b/ydb/core/persqueue/pq_l2_cache.h @@ -12,7 +12,7 @@ namespace NKikimr { namespace NPQ { -static const ui32 MAX_BLOB_SIZE = 8 << 20; //8mb +static const ui32 MAX_BLOB_SIZE = 8_MB; struct TL2Counters { NMonitoring::TDynamicCounters::TCounterPtr TotalSize; @@ -78,7 +78,7 @@ public: } TPersQueueCacheL2(const TCacheL2Parameters& params, TIntrusivePtr countersGroup) - : Cache(ClampMinSize(1_MB)/MAX_BLOB_SIZE) // It's some "much bigger then we need" size here. + : Cache(1_TB / MAX_BLOB_SIZE) // It's some "much bigger then we need" size here. , MaxSize(ClampMinSize(params.MaxSizeMB * 1_MB)) , CurrentSize(0) , KeepTime(params.KeepTime) -- cgit v1.3