diff options
| author | ivanmorozov333 <[email protected]> | 2024-01-25 16:44:24 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-01-25 16:44:24 +0300 |
| commit | bf6d7760667c983980aadea63b8802a3469f58c9 (patch) | |
| tree | 9a78fd90eae0ff34beadd9de56d632ca777a78dc | |
| parent | 17ca7a29a85f9c25d3e50f2b84374b8edae5021a (diff) | |
Fix delete table (#1283)
| -rw-r--r-- | ydb/core/tx/columnshard/counters/engine_logs.cpp | 4 | ||||
| -rw-r--r-- | ydb/core/tx/columnshard/engines/changes/cleanup.cpp | 2 | ||||
| -rw-r--r-- | ydb/core/tx/columnshard/engines/column_engine_logs.h | 8 |
3 files changed, 3 insertions, 11 deletions
diff --git a/ydb/core/tx/columnshard/counters/engine_logs.cpp b/ydb/core/tx/columnshard/counters/engine_logs.cpp index a514f72f41e..07b2844e97d 100644 --- a/ydb/core/tx/columnshard/counters/engine_logs.cpp +++ b/ydb/core/tx/columnshard/counters/engine_logs.cpp @@ -17,8 +17,8 @@ TEngineLogsCounters::TEngineLogsCounters() const std::map<i64, TString> portionSizeBorders = {{0, "0"}, {512 * 1024, "512kb"}, {1024 * 1024, "1Mb"}, {2 * 1024 * 1024, "2Mb"}, {4 * 1024 * 1024, "4Mb"}, {8 * 1024 * 1024, "8Mb"}, {16 * 1024 * 1024, "16Mb"}, - {32 * 1024 * 1024, "32Mb"}, {64 * 1024 * 1024, "64Mb"}}; - const std::set<i64> portionRecordBorders = {0, 2500, 5000, 7500, 9000, 10000, 20000, 40000, 80000, 160000}; + {32 * 1024 * 1024, "32Mb"}, {64 * 1024 * 1024, "64Mb"}, {128 * 1024 * 1024, "128Mb"}, {256 * 1024 * 1024, "256Mb"}, {512 * 1024 * 1024, "512Mb"}}; + const std::set<i64> portionRecordBorders = {0, 2500, 5000, 7500, 9000, 10000, 20000, 40000, 80000, 160000, 320000, 640000, 1024000}; for (auto&& i : GetEnumNames<NOlap::NPortion::EProduced>()) { if (BlobSizeDistribution.size() <= (ui32)i.first) { BlobSizeDistribution.resize((ui32)i.first + 1); diff --git a/ydb/core/tx/columnshard/engines/changes/cleanup.cpp b/ydb/core/tx/columnshard/engines/changes/cleanup.cpp index e3eacf5d40c..e99f5730913 100644 --- a/ydb/core/tx/columnshard/engines/changes/cleanup.cpp +++ b/ydb/core/tx/columnshard/engines/changes/cleanup.cpp @@ -17,7 +17,6 @@ void TCleanupColumnEngineChanges::DoDebugString(TStringOutput& out) const { void TCleanupColumnEngineChanges::DoWriteIndex(NColumnShard::TColumnShard& self, TWriteIndexContext& context) { self.IncCounter(NColumnShard::COUNTER_PORTIONS_ERASED, PortionsToDrop.size()); - THashSet<TUnifiedBlobId> blobIds; THashSet<ui64> pathIds; for (auto&& p : PortionsToDrop) { auto removing = BlobsAction.GetRemoving(p); @@ -33,7 +32,6 @@ void TCleanupColumnEngineChanges::DoWriteIndex(NColumnShard::TColumnShard& self, } bool TCleanupColumnEngineChanges::DoApplyChanges(TColumnEngineForLogs& self, TApplyChangesContext& context) { - THashSet<TUnifiedBlobId> blobIds; for (auto& portionInfo : PortionsToDrop) { if (!self.ErasePortion(portionInfo)) { AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "Cannot erase portion")("portion", portionInfo.DebugString()); diff --git a/ydb/core/tx/columnshard/engines/column_engine_logs.h b/ydb/core/tx/columnshard/engines/column_engine_logs.h index 4f552e4d062..5ce93a914ec 100644 --- a/ydb/core/tx/columnshard/engines/column_engine_logs.h +++ b/ydb/core/tx/columnshard/engines/column_engine_logs.h @@ -156,13 +156,7 @@ public: virtual bool HasDataInPathId(const ui64 pathId) const override { auto g = GetGranuleOptional(pathId); - if (!g) { - return false; - } - if (g->GetPortions().size()) { - return false; - } - return true; + return g && g->GetPortions().size(); } bool IsGranuleExists(const ui64 pathId) const { |
