Repository navigation
Add test: table_readonly alterPartition gate default: break; allow-path (FREEZE/UNFREEZE) untested - #109007
Add test: table_readonly alterPartition gate default: break; allow-path (FREEZE/UNFREEZE) untested#109007clickgapai wants to merge 1 commit into
table_readonly alterPartition gate default: break; allow-path (FREEZE/UNFREEZE) untested#109007Conversation
|
Pre-PR Validation Gate (per ClickGap pipeline): a) Deterministic repro? ✅ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [0bb0a07] Summary: ❌
AI ReviewSummary
Missing context / blind spots
Final Verdict
|
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 143 line(s), 4 function(s) across 48 file(s) · Details Top files
|
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.
Adds test coverage for 1 untested code path(s), found during automated review of PR #95079.
That PR The PR adds a
table_readonlyMergeTree setting that (1) rejects foreground modifications onStorageMergeTree(assertNotReadonlyfor INSERT/mutation/OPTIMIZE), (2) rejects data-mutating partition commands inMergeTreeData::alterPartition(ATTACH/MOVE/DROP/DROP DETACHED/FETCH/REPLACE PARTITION1.
table_readonlyalterPartition gatedefault: break;allow-path (FREEZE/UNFREEZE) untestedsrc/Storages/MergeTree/MergeTreeData.cpp:7026Risk: The readonly gate switch at
MergeTreeData.cpp:7017-7028 only throws for the six mutatingPartitionCommandtypes and falls throughdefault: break;for everything else. PR tests only cover the throwing cases (04490) — the allow path is uncovered (LLVM: 7025-7026 marked >>). Risk: if the switch is ever refactored into a reject-by-default whitelist (or thedefaultcase dropped), FREEZE/UNFREEZE (backup) of a read-only table — e.g. a rotated system log table an operator wants to archive — …What's unique vs PR tests: PR test 04490 covers only the REJECTED partition commands (DROP/DETACH/ATTACH) on a read-only table. This test covers the complementary ALLOW path — FREEZE/UNFREEZE succeed on a read-only table — which is the
default: break;branch the PR's own tests never reach.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes