Repository navigation
Fix flaky test 03365_column_ttl_should_rebuild_skp_idx_and_proj - #108805
alexey-milovidov merged 2 commits into
Conversation
The test polled a fresh clickhouse-client every second (up to 300 iterations) waiting for a background column-TTL merge to zero out x. On the amd_msan/WasmEdge shard each client spawn carries large overhead and the background TTL merge is not guaranteed to run soon (merge_with_ttl_timeout default is 4h), so the loop exhausted the 600s job cap and timed out (CIDB: OK runs p50 15s / max 70s, but the failures sit exactly at 600.1s). Replace the polling loop with OPTIMIZE TABLE tbl FINAL, which forces the merge synchronously through the same code path the background TTL merge uses: it drops the expired columns and recalculates the dependent skip index and projection. This is deterministic and finishes in ~1.5s. The assertions are unchanged, so the test still verifies that the skip index and projection are rebuilt when a column is fully dropped by TTL. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-0:20260629-101300 |
|
cc @CurtizJ — could you review this? It de-flakes 03365_column_ttl_should_rebuild_skp_idx_and_proj (600s timeout on amd_msan/WasmEdge) by replacing the background-TTL-merge polling loop with a deterministic |
|
Workflow [PR], commit [66b35a6] Summary: ✅ AI ReviewSummaryThis PR replaces the polling loop in Final Verdict
|
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 407 line(s), 29 function(s) across 138 file(s) · Details Top files
|
CI finish ledger — ce7712bEvery failure below has an owner: a fixing PR (ours or external), or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only
This PR's own fix (03365_column_ttl_should_rebuild_skp_idx_and_proj — replace the polling loop with OPTIMIZE FINAL) is green; the sole red check is the pre-existing chronic "Not-ready Set" fuzzer LOGICAL_ERROR, tracked by a full-effort fix task. Session id: cron:our-pr-ci-monitor:20260629-183000 |
|
@alexey-milovidov the fix for the test |
|
@Fgrtue thanks. Confirmed: #96130 applies the same fix to this test (drop the 300-iteration polling loop, force the merge with #108805 is a single-file, approved, CI-green change, so merging it now fixes the 600s amd_msan/WasmEdge timeout without touching or destabilizing the other 430 files in #96130. Since the 03365 change is near-identical in both, whichever lands first makes the other's 03365 edit a trivial drop/rebase. I am equally happy to close #108805 in favor of #96130 if you prefer a single landing. I will defer the ordering to you. |
|
#96130 is huge, it's unclear when it will be merged. It discovers and accumulates a lot of fixes, but all of them make sense to be submitted separately. |
|
Agreed, I will keep #108805 open then. It is one test file ( No conflict risk with #96130 either way: master has not touched this file since January, and #96130 applies the same fix here (drop the 300-iteration |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Fix flaky
03365_column_ttl_should_rebuild_skp_idx_and_proj(600s timeout onStateless tests (amd_msan, WasmEdge, parallel, 2/2)).The test polled a fresh
clickhouse-clientevery second (up to 300 iterations) waiting for a background column-TTL merge to zero outx. On the amd_msan/WasmEdge shard each client spawn carries large overhead, and the background TTL merge is not guaranteed to run soon (merge_with_ttl_timeoutdefault is 4h), so the loop exhausted the 600s job cap and timed out.CIDB confirms this is a hang, not an intrinsically-slow test: OK runs on this shard are p50 15s / p90 19s / max 70s, but the failures sit exactly at 600.1s.
Fix: replace the polling loop with
OPTIMIZE TABLE tbl FINAL. This forces the merge synchronously through the same code path the background TTL merge uses (drops the expired columns and recalculates the dependent skip index and projection), so it is deterministic and finishes in ~1.5s. The assertions and the.referenceare unchanged, so the test still verifies that the skip index and projection are rebuilt when a column is fully dropped by TTL.Verified locally: 80/80 passes with randomization enabled (~1.5s each). Reproduced the timeout path by suppressing the background TTL merge (the original loop never converges;
OPTIMIZE FINALapplies the TTL in ~0.1s).Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108787&sha=505ad9efc6bf49975d1d54b0a6045adff0ff144b&name_0=PR&name_1=Stateless%20tests%20%28amd_msan%2C%20WasmEdge%2C%20parallel%2C%202%2F2%29
Version info
26.8.1.360(included in26.8and later)