Repository navigation
Keep the ProfileEvents-checked reads of 05345_text_index_prewhere_read_step_order off parallel replicas - #125892
Conversation
…d_step_order off parallel replicas The test compares `RowsReadByPrewhereReaders` with `SelectedRows` on the initiator's `query_log` row. In the `ParallelReplicas` lane the initiator's `SelectedRows` covers the whole read, while a remote replica that wins marks counts its reads on its own row (`current_database = 'default'`), which the `current_database = currentDatabase()` filter drops. The numerator then shrinks and `read_order_index_first` flips from 0 to 1. Initiator plus remote rows always give the expected ratio, so the replicas read in the same PREWHERE step order. Run only the four measured reads with `enable_parallel_replicas = 0`, as ClickHouse#124911 did for the string filter tests; the other reads keep running under parallel replicas in that lane. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review: a cold code review that had not seen the implementation notes, plus an independent second-model gate (engine: codex), both on this head. 0 findings from either. Checked: the query-level Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261014-213200 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261014-210700 |
|
Workflow [PR], commit [fbaee94] Summary: ✅ AI ReviewSummaryThis PR sets Final VerdictStatus: ✅ Approve |
|
cc @ahmadov, could you review this and add the |
CI finish ledger - 08bbbefEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
CIDB has no other Session id: cron:our-pr-ci-monitor:20261015-230015 |
|
@groeneai, as the fix for 05350_comparison_tuple_elimination_shared_alias is merged, update the branch here. |
…t-index-prewhere-parallel-replicas
|
@groeneai why do not use |
|
The pin is only on the four reads whose |
Related: #124880
Related: #124911
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
05345_text_index_prewhere_read_step_order(added in #124880) fails only inStateless tests (arm_binary, ParallelReplicas, s3 storage, parallel): 5 of 36 runs, always the single lineread_order_index_first 0->1, with every result row matching. Reports: #124880, #118662, #123144, #123537.The oracle compares
RowsReadByPrewhereReaderswithSelectedRowson the initiator'squery_logrow. Under parallel replicas the initiator'sSelectedRowscovers the whole read, but a remote replica that wins marks counts its reads on its own row (current_database = 'default'), which the filter drops. The numerator shrinks and the ratio falls below 1.5. Summed over all replicas the ratio stays exactly 2, so the replicas read in the same order and the engine is fine.The change runs only the four measured reads with
enable_parallel_replicas = 0, as #124911 did for the string filter tests. The other reads keep running under parallel replicas in that lane.Validation on a local
ParallelReplicasrig, same binary: unmodified, the test fails 10 of 30 runs (5 of 30 with a failpoint that delays the local replica), each time only when a remote replica did the read; fixed, 30/30 and 30/30. Removing the pin fromread_order_index_firstalone fails it again. 50/50 with randomized settings on a plain server.Workflow [PR]
Sync PR [sync-upstream/pr/125892]
Version info
26.11.1.66-master(included in26.11and later)