Skip to content

Commit bf6d776

Browse files
Fix delete table (#1283)
1 parent 17ca7a2 commit bf6d776

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

ydb/core/tx/columnshard/counters/engine_logs.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ TEngineLogsCounters::TEngineLogsCounters()
1717
const std::map<i64, TString> portionSizeBorders = {{0, "0"}, {512 * 1024, "512kb"}, {1024 * 1024, "1Mb"},
1818
{2 * 1024 * 1024, "2Mb"}, {4 * 1024 * 1024, "4Mb"},
1919
{8 * 1024 * 1024, "8Mb"}, {16 * 1024 * 1024, "16Mb"},
20-
{32 * 1024 * 1024, "32Mb"}, {64 * 1024 * 1024, "64Mb"}};
21-
const std::set<i64> portionRecordBorders = {0, 2500, 5000, 7500, 9000, 10000, 20000, 40000, 80000, 160000};
20+
{32 * 1024 * 1024, "32Mb"}, {64 * 1024 * 1024, "64Mb"}, {128 * 1024 * 1024, "128Mb"}, {256 * 1024 * 1024, "256Mb"}, {512 * 1024 * 1024, "512Mb"}};
21+
const std::set<i64> portionRecordBorders = {0, 2500, 5000, 7500, 9000, 10000, 20000, 40000, 80000, 160000, 320000, 640000, 1024000};
2222
for (auto&& i : GetEnumNames<NOlap::NPortion::EProduced>()) {
2323
if (BlobSizeDistribution.size() <= (ui32)i.first) {
2424
BlobSizeDistribution.resize((ui32)i.first + 1);

ydb/core/tx/columnshard/engines/changes/cleanup.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ void TCleanupColumnEngineChanges::DoDebugString(TStringOutput& out) const {
1717

1818
void TCleanupColumnEngineChanges::DoWriteIndex(NColumnShard::TColumnShard& self, TWriteIndexContext& context) {
1919
self.IncCounter(NColumnShard::COUNTER_PORTIONS_ERASED, PortionsToDrop.size());
20-
THashSet<TUnifiedBlobId> blobIds;
2120
THashSet<ui64> pathIds;
2221
for (auto&& p : PortionsToDrop) {
2322
auto removing = BlobsAction.GetRemoving(p);
@@ -33,7 +32,6 @@ void TCleanupColumnEngineChanges::DoWriteIndex(NColumnShard::TColumnShard& self,
3332
}
3433

3534
bool TCleanupColumnEngineChanges::DoApplyChanges(TColumnEngineForLogs& self, TApplyChangesContext& context) {
36-
THashSet<TUnifiedBlobId> blobIds;
3735
for (auto& portionInfo : PortionsToDrop) {
3836
if (!self.ErasePortion(portionInfo)) {
3937
AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "Cannot erase portion")("portion", portionInfo.DebugString());

ydb/core/tx/columnshard/engines/column_engine_logs.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,7 @@ class TColumnEngineForLogs : public IColumnEngine {
156156

157157
virtual bool HasDataInPathId(const ui64 pathId) const override {
158158
auto g = GetGranuleOptional(pathId);
159-
if (!g) {
160-
return false;
161-
}
162-
if (g->GetPortions().size()) {
163-
return false;
164-
}
165-
return true;
159+
return g && g->GetPortions().size();
166160
}
167161

168162
bool IsGranuleExists(const ui64 pathId) const {

0 commit comments

Comments
 (0)