diff --git a/ydb/core/tx/columnshard/engines/storage/optimizer/lcbuckets/planner/abstract.h b/ydb/core/tx/columnshard/engines/storage/optimizer/lcbuckets/planner/abstract.h index 6eac27d4dc13..20000d3e1d59 100644 --- a/ydb/core/tx/columnshard/engines/storage/optimizer/lcbuckets/planner/abstract.h +++ b/ydb/core/tx/columnshard/engines/storage/optimizer/lcbuckets/planner/abstract.h @@ -135,8 +135,12 @@ class TCompactionTaskData { public: ui64 GetTargetCompactionLevel() const { if (MemoryUsage > ((ui64)1 << 30)) { - AFL_VERIFY(TargetCompactionLevel); - return TargetCompactionLevel - 1; + if (TargetCompactionLevel) { + return TargetCompactionLevel - 1; + } else { + AFL_VERIFY(false); + return 0; + } } else { return TargetCompactionLevel; }