Repository navigation
Conversation
The test waits for the async MUTATE_PART log entry (assigned by
mergeSelectingTask) to appear in system.replication_queue using a bounded
poll loop of param_tries={1..10} (up to 20s). Under heavy parallel CI load
the BackgroundSchedulePool can delay the assignment past that window, so the
loop gives up before the entry is created: the queue select then misses the
MUTATE_PART line and the ALTER DELETE row is never removed, producing the
observed result-differs failure.
Extend the three poll loops from {1..10} (20s) to {1..30} (60s, matching the
test's own receive_timeout=30) so assignment is tolerated under contention.
The loops early-terminate the moment the condition is met, so a normal run is
unaffected. Test intent and the reference output are unchanged.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-5:20260630-101200 |
|
cc @alexey-milovidov — fix for the |
|
Workflow [PR], commit [24c098d] Summary: ❌
AI ReviewSummaryThis PR hardens flaky stateless test Final VerdictStatus: ✅ Approve |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 101 line(s), 12 function(s) across 45 file(s) · Details Top files
|
CI finish ledger — 24c098dCI fully finished (Finish Workflow: success). This PR is a test-only change: it extends the three poll loops in
Session id: cron:our-pr-ci-monitor:20260630-173000 |
7ac2edc
…-alter-delete-drop-column-flaky Fix flaky test 02441_alter_delete_and_drop_column
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix flaky test
02441_alter_delete_and_drop_column.Description
Requested by @alexey-milovidov in #106821, where this was the only red check (in
Stateless tests (amd_tsan, parallel, 2/2)) and unrelated to that PR.Root cause. After
SYSTEM STOP MERGES+ALTER TABLE ... DELETE, the test waits for theMUTATE_PARTlog entry to appear insystem.replication_queuevia a bounded poll loop (url(... param_tries={1..10} ...)withsleepEachRow(2), i.e. up to 20s). That entry is assigned asynchronously bymergeSelectingTask.StorageReplicatedMergeTree::mutate()wakes the task immediately, but under heavy parallel CI load theBackgroundSchedulePoolcan run it late, and aCannotSelectattempt backs off (merge_selecting_sleep_ms= 5s, growing x1.2). When assignment lands past the 20s window the loop gives up, the queue select misses theMUTATE_PARTline, and then=10row is never deleted, giving the observed result-differs:STOP MERGESblocks mutation execution, not assignment, so once assigned the entry stays queued untilSTART MERGES; waiting for it to appear is correct, it just needs a reliable budget.Fix. Extend the three poll loops from
{1..10}(20s) to{1..30}(60s, matching the test's ownreceive_timeout=30). The loops early-terminate as soon as the condition holds, so a normal run is unaffected (~sub-second). The reference output and the test's assertions are unchanged.Reproduction (local). With the
rmt_merge_selecting_task_pause_when_scheduledfailpoint forcing a delayed assignment, the old{1..10}loop produces exactly the failure signature above, while the new{1..30}loop (assignment released after ~8s) produces the expected reference output. The flake is rare (the specific signature appears in CIDB only twice in 90 days; there are no true-master occurrences).Version info
26.7.1.431(included in26.7and later)