Repository navigation
Fix flaky 02968_file_log_multiple_read: wait for all rows before reading them - #126074
Conversation
…ing them The waits before the two SELECTs required `count() >= 1` and `count() >= 11`, which only proves that one FileLog batch was committed. The second round appends lines 1..20 with separate writes, so a batch can start in the middle of the loop and read a prefix, with the rest arriving in the next batch. On `Stateless tests (arm_binary, s3 storage, DBReplicated, sequential)` the SELECT then ran between the part with 11..18 and the part with 19, 20, and printed 1..18 (PR ClickHouse#125135) or 1..19 (PR ClickHouse#125433). Wait for every row the following SELECT prints instead (10 and 20). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings), plus my own cold review of the diff (0 findings). No findings to adjudicate. Checked: both new thresholds equal the row counts in the Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261015-165500 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-41:20261015-163700 |
|
Workflow [PR], commit [a1e4556] Summary: ✅ AI ReviewSummaryThe PR fixes a race in Final VerdictStatus: ✅ Approve |
|
cc @kssenii, could you review this? Test-only: the waits in 02968_file_log_multiple_read now require all 10 and 20 rows instead of one FileLog batch, so the SELECT no longer races the batch that commits lines 19 and 20. |
5f78a86
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required.
Description
Related: #125135
Failures:
Stateless tests (arm_binary, s3 storage, DBReplicated, sequential)on #125135 (output stops at 18) and #125433 (stops at 19).The test waited for
count() >= 1before the firstSELECT(10 rows expected) and forcount() >= 11before the second (20 rows expected), which only proves that one FileLog batch was committed. The second round appends lines 1..20 with 20 separateechos, so a batch can start in the middle of the loop and read only a prefix; the remaining lines arrive in the next batch. In the failing job's server log, the part with ids 11..18 was committed at 11.433, the test'scount()saw 18 at 11.443, itsSELECTprinted 1..18 at 11.518, and the part with 19 and 20 was committed at 11.617. No rows were lost.The waits now require every row the following
SELECTprints (10 and 20).Validation with a master debug binary, on local disk and on s3-backed MergeTree with
--replicated-database:Workflow [PR]
Sync PR [sync-upstream/pr/126074]
Version info
26.11.1.32-master(included in26.11and later)