Skip to content

Fix delete table #1283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ydb/core/tx/columnshard/counters/engine_logs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions ydb/core/tx/columnshard/engines/changes/cleanup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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());
Expand Down
8 changes: 1 addition & 7 deletions ydb/core/tx/columnshard/engines/column_engine_logs.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,7 @@ class TColumnEngineForLogs : public IColumnEngine {

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 {
Expand Down