Repository navigation
Conversation
The test compared cityHash64(groupArray(ki)) over the merged table with the hash of 0..149999, which depends on the order rows reach groupArray. Under parallel replicas that order is the order in which the initiator merges the replicas' partial states, and --parallel_replicas_local_plan=1 does not stop a remote replica from being assigned ranges. In the failing CI run (PR ClickHouse#115004, Stateless tests (arm_binary, ParallelReplicas, s3 storage, parallel)) the coordinator gave marks 0..7 to a remote replica and 8..18 to the local one, and only range(65536, 150000) ++ range(0, 65536) hashes to the observed value: the part was correct, only the concatenation order differed. Check the physical order directly with count() ... WHERE ki != _part_offset. It does not depend on the read order, keeps parallel replicas coverage, and together with count() = 150000 still detects an unsorted part, a lost row or a duplicate. _part_offset is computed per read range, so it stays correct when replicas split the part. The max_threads=1 / local plan workaround is no longer needed. 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; 1 finding).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261005-085000 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261005-080301 |
|
Workflow [PR], commit [ccd87c8] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict
|
Related: #115004
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
00443_optimize_final_vertical_mergefailed once inStateless tests (arm_binary, ParallelReplicas, s3 storage, parallel): the last line was-4768086322359309556instead of0, while the row count and per-row column checks matched.The test compared
cityHash64(groupArray(ki))over the table with the hash of0..149999, so it depended on the order in which rows reachgroupArray. Under parallel replicas that is the order in which the initiator merges the replicas' partial states, and--parallel_replicas_local_plan=1does not stop a remote replica from getting a range. In the failing run the coordinator gave marks 0..7 to a remote replica and 8..18 to the local one, and of all arrangements of those ranges onlyrange(65536, 150000)followed byrange(0, 65536)hashes to the observed value. The part was correct; only the concatenation order differed.The check now asserts the physical order directly with
SELECT count() FROM $name WHERE ki != _part_offset, which does not depend on the read order and keeps the parallel replicas coverage. Together withcount() = 150000it still detects an unsorted part, a lost row or a duplicate. The--max_threads=1 --parallel_replicas_local_plan=1workaround is removed.Validation on a 3-replica parallel replicas setup: with ranges forced to split between replicas (1M rows,
index_granularity = 8), the old checksum mismatched in 60/60 runs and the new check returned 0 in 120/120 runs, 61 of them with rows read by more than one replica. A reversed part gives 150000, a missing row 148999, a duplicate 1. The test passed 300/300 with randomized settings, atparallel_replicas_local_plan0, 1 and random, and without parallel replicas.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/123977]
Version info
26.10.1.1675-master(included in26.10and later)