Repository navigation
Keep the overflow arms of 04896_orfill_merge_group_by_overflow_any off parallel replicas - #123679
Conversation
…f parallel replicas The group_by_overflow_mode = 'any' arms assert an exact surviving-key count (1000), which holds only when one aggregation stream reads the three projection parts and freezes its hash table after the first one. Under parallel replicas (the new `Stateless tests (arm_binary, ParallelReplicas, s3 storage, parallel)` job from ClickHouse#122853) each replica's AggregatingStep applies max_rows_to_group_by to its own stream, and the initiator's MergingAggregatedStep is built with the merge-only Aggregator::Params, which carry no max_rows_to_group_by. So every replica that reads at least one part keeps that part's 1000 keys, and the count is 1000 x (replicas that read a part). Which replica reads which part depends on announcement timing in ParallelReplicasReadingCoordinator. This is the documented per-server limit ("for distributed query processing, restrictions are applied on each server separately"); the values stay exact, only the key count depends on the topology. Seen on PR ClickHouse#118272: `overflow any two keys` printed 2000 instead of 1000. Pin enable_parallel_replicas = 0 in the outer SETTINGS of the five `any` arms, next to the other pins that hold the topology the counts encode. The null-place merge these arms cover (ClickHouse#114740) does not depend on replica distribution. The `no overflow`, `overflow throw` and EXPLAIN arms are topology-independent and keep running under parallel replicas. The pin also covers AutoParallelReplicas, since automatic_parallel_replicas_mode requires enable_parallel_replicas != 0. 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 (2 nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261003-102900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261003-100500 |
|
Workflow [PR], commit [f720c6e] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict
|
bf5e53d
Picks up ClickHouse#123679, which fixes the 04896_orfill_merge_group_by_overflow_any failure in Stateless tests (arm_binary, ParallelReplicas, s3 storage, parallel).
Related: #122853
Related: #114740
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
04896_orfill_merge_group_by_overflow_anyfails in the newStateless tests (arm_binary, ParallelReplicas, s3 storage, parallel)job from #122853: theoverflow any two keysarm prints2000 0instead of1000 0(report).The
group_by_overflow_mode = 'any'arms assert an exact surviving-key count,1000, which holds only when one aggregation stream reads the three projection parts and freezes its hash table after the first. With parallel replicas each replica appliesmax_rows_to_group_byto its own stream ("for distributed query processing, restrictions are applied on each server separately",query-complexity.mdx), and the initiator's final merge does not apply the limit. So the count is1000times the number of replicas that got a part, which depends on which replicas announce before the parts are assigned. The values stay exact (the second column is0in every run); only the key count depends on the topology.The five
anyarms now pinenable_parallel_replicas = 0next to their other pins. The null-place merge they cover (#114740) does not depend on how parts are spread over replicas.no overflow,overflow throwand theEXPLAINarm keep running under parallel replicas.Validation: a local three-replica cluster with the
slowdown_parallel_replicas_local_plan_readfailpoint and concurrent load reproduces the2000 0diff (about 5% of loop iterations, 1/50 runner runs). With the change the test passes 50/50 there, and 50/50 with randomized settings in the regular configuration.If you prefer to keep the whole test out of this job, I can use the
no-parallel-replicastag instead.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/123679]
Version info
26.10.1.1418-master(included in26.10and later)