Repository navigation
Fix flaky test 05407_merge_tree_max_rows_to_use_cache_max_value with parallel replicas - #127290
Conversation
…parallel replicas With parallel replicas the replica that asks the coordinator first reads all 13 marks of the part. When that is a remote replica, its UncompressedCacheHits and UncompressedCacheMisses are logged only in its own query_log row (same initial_query_id, current_database = 'default'): remote ProfileEvents are forwarded to the client but are not merged into the initiator's row. The test read only the initiator's row, so in the ParallelReplicas lane one of the two rows printed 0 in about 1 of 6 runs. Sum the events over all QueryFinish rows of each initial query instead. With no parallel replicas only the initiator's row exists, so the result there is unchanged, and the parallel replicas lane keeps a real check of the forwarded merge_tree_max_rows/bytes_to_use_cache values on the reading replica. 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 review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261021-225000 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261021-223100 |
|
cc @alexey-milovidov, could you review this and add the |
|
Workflow [PR], commit [907a29c] Summary: ✅ AI ReviewSummaryThe test now sums Missing context / blind spots
Final VerdictStatus: ✅ Approve. |
79e12c3
Related: #126536
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
05407_merge_tree_max_rows_to_use_cache_max_value(added in #126536) fails inStateless tests (arm_binary, ParallelReplicas, s3 storage, parallel): 3 of its first 25 runs, on master (job) and on two unrelated PRs (#98992, #127263). One of the two rows prints0.With parallel replicas, remote replicas can read some or all of the 13 marks. Their
UncompressedCacheHits/Missesevents are only in their ownquery_logrows (sameinitial_query_id,current_database = 'default'). The test read only the initiator's row, which has 0 when the remote replicas did all the reads. The failing job's ownquery_logshows this: initiator 0 events, replica 13 hits.The check now sums the events over all
QueryFinishrows of each initial query. Without parallel replicas only the initiator's row exists, so nothing changes there. The.referenceis unchanged.Validation on a local three-replica setup: with
parallel_replicas_local_plan = 0the old check failed 10 of 10 runs and the new one passed 10 of 10. In the CI lane's mode with randomized settings the old check failed 15 of 50 runs; the new one passed 50 of 50, and also 50 of 50 without parallel replicas. On a binary built before #126536 the new check still prints05407_max_value 0, both with and without parallel replicas.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127290]
Version info
26.11.1.506-master(included in26.11and later)