From bc9c8264eec3ca7ba3089801696babb335654e67 Mon Sep 17 00:00:00 2001 From: ivanmorozov333 Date: Fri, 13 Sep 2024 12:14:52 +0300 Subject: [PATCH] dont remove portion in case granule removed --- ydb/core/tx/columnshard/engines/changes/cleanup_portions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ydb/core/tx/columnshard/engines/changes/cleanup_portions.cpp b/ydb/core/tx/columnshard/engines/changes/cleanup_portions.cpp index 7917b77682b9..979f527452e9 100644 --- a/ydb/core/tx/columnshard/engines/changes/cleanup_portions.cpp +++ b/ydb/core/tx/columnshard/engines/changes/cleanup_portions.cpp @@ -36,7 +36,9 @@ void TCleanupPortionsColumnEngineChanges::DoWriteIndexOnExecute(NColumnShard::TC void TCleanupPortionsColumnEngineChanges::DoWriteIndexOnComplete(NColumnShard::TColumnShard* self, TWriteIndexCompleteContext& context) { for (auto& portionInfo : PortionsToDrop) { - if (!context.EngineLogs.ErasePortion(portionInfo)) { + if (!context.EngineLogs.GetGranuleOptional(portionInfo.GetPathId())) { + AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "portion granule removed already")("portion", portionInfo.DebugString()); + } else if (!context.EngineLogs.ErasePortion(portionInfo)) { AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "Cannot erase portion")("portion", portionInfo.DebugString()); } }