diff options
author | mokhotskii <mokhotskii@yandex-team.ru> | 2022-04-08 01:10:18 +0300 |
---|---|---|
committer | mokhotskii <mokhotskii@yandex-team.ru> | 2022-04-08 01:10:18 +0300 |
commit | a2dddbbcbb7dd358915effe2587933b5cc8e47a6 (patch) | |
tree | 67380c6dd46748a0a6888b446577a05a110a3ec5 | |
parent | d8cd07bc1b024fcda771c09d458191a449a6f025 (diff) | |
download | ydb-a2dddbbcbb7dd358915effe2587933b5cc8e47a6.tar.gz |
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
-rw-r--r-- | ydb/core/persqueue/pq_l2_cache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ydb/core/persqueue/pq_l2_cache.h b/ydb/core/persqueue/pq_l2_cache.h index 468da5f569..2ec6e97ced 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<NMonitoring::TDynamicCounters> 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) |