Repository navigation
Keep the IN-subquery queries of 00945_bloom_filter_index off parallel replicas - #123761
devcrafter merged 2 commits into
Conversation
… replicas `max_rows_to_read = 7` on the four `IN (SELECT arrayJoin(...))` queries is one granule (6 rows, `index_granularity = 6`) plus the one row of `system.one` the subquery reads. Under parallel replicas the subquery also runs on every follower (`parallel_replicas_allow_in_with_subquery`), and the limit is checked against the total of all sources, remote ones included. When the remote replica that owns the only mark by hash asks the coordinator before the local replica steals it, it builds its own set and reads the granule: 1 + 1 + 6 = 8 > 7, so the query fails with TOO_MANY_ROWS "While executing Remote". Seen 3 times on 2026-10-03 in `Stateless tests (arm_binary, ParallelReplicas, s3 storage, parallel)`. Pin `enable_parallel_replicas = 0` on these four queries only, so the exact single-node budget stays; the rest of the test keeps running on parallel replicas, where each mark is read by exactly one replica. Local repro: 3-replica loopback cluster, failpoint `slowdown_parallel_replicas_local_plan_read`, `max_threads >= 2`: unfixed file fails 20/20 with `current rows: 8.00`, fixed file passes 20/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 on the test-only diff) plus my own cold review (2 nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261003-205800 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261003-193100 |
|
Workflow [PR], commit [593be56] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict
|
CI finish ledger - ea97c81Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
The diff is one test file. All checks completed; CIDB has no other Session id: cron:our-pr-ci-monitor:20261004-000624 |
Related: #122853
Related: #104924
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
00945_bloom_filter_indexfails inStateless tests (arm_binary, ParallelReplicas, s3 storage, parallel)withLimit for rows or bytes to read exceeded, max rows: 7.00, current rows: 8.00: While executing Remote. (TOO_MANY_ROWS)on one of the fourIN (SELECT arrayJoin(...)) SETTINGS max_rows_to_read = 7queries: 3 unrelated PRs on 2026-10-03, the day #122853 added this job. No related open issue found.The budget 7 is one granule (6 rows) plus the one row of
system.onethe subquery reads. With parallel replicas the subquery also runs on the replica that reads the granule (parallel_replicas_allow_in_with_subquery), and the limit counts the rows of all replicas. When the remote replica that owns the only mark asks the coordinator before the local replica takes it, the count is 1 + 1 + 6 = 8. Both set builds really read that row, so the count is correct; the exact budget only holds on one node.Change.
enable_parallel_replicas = 0on these four queries only. The other 44 budgeted queries have no subquery, each mark is read by one replica, and they keep running on parallel replicas.Validation (master debug build, 3-replica loopback cluster, failpoint
slowdown_parallel_replicas_local_plan_read,max_threads >= 2):current rows: 8.00; the coordinator gives the mark to replica 1, as in the CI server log;WHERE i32 = 1still does;🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/123761]
Version info
26.10.1.1556-master(included in26.10and later)