Skip to content

Commit

Permalink
merge to stable-24-1: use proper compaction policy for SA tables (#5517)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexd65536 authored Jun 14, 2024
1 parent d5bffd8 commit 7487d61
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ydb/core/statistics/aggregator/tx_init_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ struct TStatisticsAggregator::TTxInitSchema : public TTxBase {

NIceDb::TNiceDb(txc.DB).Materialize<Schema>();

static constexpr NIceDb::TTableId bigTableIds[] = {
Schema::BaseStats::TableId,
};

for (auto id : bigTableIds) {
const auto* tableInfo = txc.DB.GetScheme().GetTableInfo(id);
if (!tableInfo || !tableInfo->CompactionPolicy) {
txc.DB.Alter().SetCompactionPolicy(id, *NLocalDb::CreateDefaultUserTablePolicy());
}
}

return true;
}

Expand Down

0 comments on commit 7487d61

Please sign in to comment.