Repository navigation
Conversation
|
Workflow [PR], commit [31b5ce9] Summary: ✅
AI ReviewSummaryThis PR avoids rewriting eligible Missing context / blind spots
Final VerdictStatus: ✅ Approve. No code changes requested. Integration CI remains pending. |
…e snapshot for planning and interpretation
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units25 translation units recompiled, 301 s compile time in total, 25 of them have a recent master baseline. |
When canRecalculateTTLWithoutRewritingData() rejects the in-place path, ctx->recalculate_ttl_only is correctly set to false, but the interpreter was still receiving the raw table setting. This caused getUpdatedHeader() to prune write columns even when a full rewrite was needed, breaking the compact-part fallback with "none of its columns would remain". Co-Authored-By: Claude Opus 4.6 <[email protected]>
When ctx->recalculate_ttl_only is false (wide parts where canRecalculateTTLWithoutRewritingData returns false), unconditionally setting settings.materialize_ttl_recalculate_only = false overrides the table-level materialize_ttl_recalculate_only = 1 setting. This causes the interpreter to apply the TTL (deleting rows) instead of only recalculating TTL metadata, breaking the existing 02129_add_column_add_ttl test. Only set the optional when the compact-part optimisation is active; otherwise leave it as nullopt so the interpreter falls back to reading the table setting.
The false value was not being passed to MutationsInterpreter::Settings, causing the interpreter to fall back to re-reading the live table setting. This created a race when the setting was changed between mode selection and interpreter preparation.
8d2c948 to
4092d97
Compare
The else branch in MutateTask::prepare() had multiple statements without braces, causing only the first (a redundant variable declaration) to be conditional. This triggered -Wshadow, -Wmisleading-indentation, and -Wunused-variable errors. The redeclared suitable_for_ttl_optimization is unnecessary — it was already computed above using the snapshotted merge_tree_settings.
…ttl-recalculate Conflicts in src/Storages/MergeTree/MutateTask.cpp: - collectFilesToSkip: keep both new entries, secondary_index_column_types.json (ClickHouse#122846) and uuid.txt. - PartMergerWriter::prepare: keep the recalculate_ttl_only chassert, drop the squash memory cap that master reverted (ClickHouse#128706).
Master's ClickHouse#125025 skips the column writer of MutateSomePartColumnsTask when the mutation only recalculates TTL. Keep that guard around the writer, after the TTL transforms, which still read the rewritten column list computed above. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-only-mutation-space Conflicts in MutateTask.cpp, ReplicatedMergeTreeQueue.cpp and StorageMergeTree.cpp: - mutationRequiresFullPartRewrite, which replaced the shape predicate in rewritesAllPartColumns and splitAndModifyMutationCommands, now uses isPerFilePartStorage (ClickHouse#126865), and splitAndModifyMutationCommands keeps master's future_storage_type condition and getColumnNameInStorage. - processStatisticsChanges takes master's new parameters and rename handling and keeps the bool result and the early return for unchanged statistics. - The !recalculate_ttl_only condition (ClickHouse#125025) moves into requires_full_part_rewrite, which rewrites_all_columns reuses. - The queue keeps both master's source_parts and mutation_source_part. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reuse the partial-mutation path without a data writer for compact parts with Full storage. Exclude uuid.txt from hardlinks and capture materialize_ttl_recalculate_only once during mutation preparation.
Closes: #124351
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Avoid rewriting non-packed compact parts during MATERIALIZE TTL when materialize_ttl_recalculate_only = 1.
Workflow [PR]
Sync PR [sync-upstream/pr/125025]
Version info
26.11.1.2571-master(included in26.11and later)