Repository navigation
Fix flaky test 04267_ttl_drop_merge_no_data_read - #114050
Merged
Merged
Conversation
The `TTLDropMerge` in Case 2 produces an empty part, and the cleanup thread removes empty parts in the background (the `remove_empty_parts` MergeTree setting is enabled by default). When that removal wins the race against the test's `SELECT projections FROM system.parts WHERE ... active` check, the query returns zero rows instead of the expected `[]` line. Set `remove_empty_parts = 0` on the Case 2 table so the empty part deterministically stays active for the check. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113248&sha=0f4ecdf5bcb488588e9d664687d1b482d67d62f9&name_0=PR&name_1=Stateless%20tests%20%28amd_msan%2C%20WasmEdge%2C%20parallel%2C%201%2F3%29 PR: #113248 Co-Authored-By: Claude Fable 5 <[email protected]>
Contributor
|
Workflow [PR], commit [330c150] Summary: ✅ AI ReviewSummaryThis PR makes Case 2 of Final Verdict
|
alexey-milovidov
added a commit
that referenced
this pull request
Aug 10, 2026
…shape-settings Pull in the fix for the flaky `04267_ttl_drop_merge_no_data_read` (#114050), which was the only CI red on this test-only pull request.
PedroTadim
pushed a commit
to groeneai/ClickHouse
that referenced
this pull request
Aug 10, 2026
The test operates on the empty part left by `ALTER TABLE ... DELETE`: the cleanup thread may drop that part before the `SELECT rows, marks FROM system.parts ... AND active` check sees it, making the first reference line disappear. Pin `remove_empty_parts = 0` in the table settings, the same way ClickHouse#114050 fixed `04267_ttl_drop_merge_no_data_read`. Failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108078&sha=1588d96287dc9c13f42492972c510487be49b696&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20parallel%29 PR with the failure: ClickHouse#108078 Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #113248
Related: #105859
The test flaked on the amd_msan shard of PR #113248 (CI report) and earlier twice on unrelated PR #96130, with the
[]line of Case 2 missing from the output.Case 2 checks that the part produced by a
TTLDropMergecontains no projections, viaSELECT projections FROM system.parts WHERE ... AND active. That merge produces an empty part, andMergeTreeCleanupThreadcallsclearEmptyParts, which drops parts with zero rows in the background (theremove_empty_partsMergeTree setting is enabled by default — its documentation even says "Remove empty parts after they were pruned by TTL"). When the removal wins the race against the check, the query returns zero rows instead of one row with[].The fix sets
remove_empty_parts = 0on the Case 2 table, so the empty part deterministically stays active for the check. The other cases only query the table itself andsystem.part_log, both of which are unaffected by empty-part removal. Verified withclickhouse local: after the TTL merge with the setting applied, exactly one active part remains with[]projections and zero rows.Changelog category (leave one):
Version info
26.8.1.1056(included in26.8and later)