Repository navigation
Do not add serialize_query_plan to the upgrade check's randomized options - #119406
PedroTadim merged 1 commit into
Conversation
… load Upgrade check (amd_release) runs on every pull request and began losing its server on roughly one run in five on 2026-09-11: 24 of 126 shas that day carried 'Got read request from replica 0 for unknown stream ...' (ParallelReplicasReadingCoordinator.cpp:1316), against 0 of 3457 shas over the preceding twelve days. The abort kills the server, so the job reports "Server died" and loses every remaining assertion in it. The cause is a harness change, not an engine change. ClickHouse#116783 added a nested serialize_query_plan=1 draw inside the stress option generator's parallel-replicas arm without the 'not upgrade_check' guard its sibling arms carry. The upgrade check's only test load runs against the previous release server, resolved at run time (currently v26.8.2.7), and that shipped binary aborts on the serialized-plan parallel-replicas path. Because the defect is in a released binary, no change to master can clear it from this job, which is what makes the red permanent rather than a bug report. The same option on a current build is not implicated: over 09-04 to 09-11 Stress test (*), which gets the identical arm at the identical probability against the PR's own build, produced 0 to 1 affected shas per day out of 259 to 483, and the signature has no true-master occurrences in 30 days. So the guard is added rather than the arm removed: classic parallel-replicas coverage in the upgrade check is preserved, and serialize_query_plan coverage continues in every Stress test flavour, where a failure names a fixable defect. This matches the convention used seven times in the same function, including the enable_cascades_optimizer arm ClickHouse#116783 itself added for the same reason. Verified by executing get_options 4000 times per condition: under upgrade_check, serialize_query_plan goes from 388 to 0, while enable_parallel_replicas stays at 820, confirming the guard did not land on the outer draw, and the upgrade_check=False counts are unchanged. Related: ClickHouse#118093 Related: ClickHouse#119372 Related: ClickHouse#110518 Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: claude; 0 findings; it read the whole
Severity: ❌ blocker / One thing I noticed and am deliberately not raising: #116783 also raised five fault-injection Session id: cron:clickhouse-review-slot-9:20260911-074700 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20260911-070900 |
|
Workflow [PR], commit [5620afa] Summary: ✅ AI ReviewSummaryThis PR stops Findings
Final Verdict
|
| # Ship serialized query plans to the replicas instead of query text. The upgrade | ||
| # check's only test load runs against the previous release, so a failure on this | ||
| # path there cannot be fixed by any change to master. | ||
| if random.random() < 1 / 2 and not upgrade_check: |
There was a problem hiding this comment.
This guard only removes the harness-generated serialize_query_plan=1; it does not keep the upgrade check's pre-upgrade load off serialized plans entirely. The v26.8.2.7-lts query suite that upgrade_runner.sh replays still has untagged tests that explicitly set serialize_query_plan = 1 together with distributed / parallel-replica reads, for example 0_stateless/04043_materialized_cte_serialize_query_plan.sql and 0_stateless/04227_pr_materialized_cte_set_subquery.sql. Because those tests are still runnable under --upgrade-check, the frozen release can still enter the same unfixable surface; either skip or override those cases too, or narrow the PR title/body to "stop the random option generator from adding serialize_query_plan=1".
There was a problem hiding this comment.
Both premises check out; the conclusion does not.
True: at v26.8.2.7-lts both files are in the replayed corpus and both carry SET serialize_query_plan = 1 with no -- Tags: line. And the guard does only remove the generated draw.
Refuted: those two tests have never produced this abort.
- They are byte-identical at
v26.8.1.2041-lts(08-30) andv26.8.2.7-lts(09-01), sha2564c8ace62aef25ce7and08040686da9279f9, so they sat unchanged in the corpus across the entire clean window: 0 unknown-stream aborts inUpgrade check (amd_release)over the 3454 shas from 08-30 to 09-10, then 24 in one day starting hours after More settings and disruptions to randomize in stress tests #116783 merged. A constant cannot produce a step change. - Over 90 days no
unknown streamabort in any check namespr_04043orpr_cte_04227. The 8 CIDB rows that mention those tables at all are Fast test / Stateless / AST fuzzer failures with unrelated signatures (UNSUPPORTED_METHOD,Code: 241, a materialized-CTE gate error). Positive controls in the same query: 31 rows namingt_mt_index_rp, 278 containingfor unknown stream. All 27 aborts namet_mt_index_rp. - Why the asymmetry: the generator injects
enable_parallel_replicas=1 ... cluster_for_parallel_replicas='parallel_replicas'as client options into every test (stress.py:504-508, itself unguarded), which is how04891, a test that never mentions parallel replicas, reaches the coordinator on tablet_mt_index_rp. 04043 and 04227 instead pin their own cluster and parallel-replicas settings in the query body, and query-level settings beat client-level injection.
"skip or override those cases too" has no mechanism: no-upgrade-check does not exist in clickhouse-test (the only thing --upgrade-check changes there is --fake-drop, tests/clickhouse-test:7738), and the corpus is a --depth=1 clone of the release tag (upgrade_runner.sh:44) consumed via --queries=previous_release_repository/tests/queries, so a tag added to master's copy cannot reach the job that is failing.
"narrow the title/body" is right, and done. The title is now "Do not add serialize_query_plan to the upgrade check's randomized options". The body claimed "Nothing else in this job sets it", enumerating the randomizer and the server-side profile but not the replayed test bodies; that was wrong, and it now names that route with the measurement above.
|
I am going to merge this, just to relax the CI |
2497bf5
Related: #110518
Related: #118093
Related: #119372
Related: #116783
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The stress option generator no longer sends
serialize_query_plan=1to the upgrade check's pre-upgrade load, whose server is a frozen previous release that aborts on that path.Description
Upgrade check (amd_release)runs on every PR and lost its server on ~18% of them today.By distinct
commit_sha: 0 of the 3454 shas running the check from 08-30 to 09-10carry
Got read request from replica 0 for unknown stream ...(
ParallelReplicasReadingCoordinator.cpp:1316), then 24 of 133 today to 08:00Z. The abortkills the server, so the job reports "Server died" and loses its remaining assertions
(run).
#116783, merged 2026-09-10 14:19Z, hours before the first affected run, added a nested
serialize_query_plan=1draw to the option generator's parallel-replicas arm without thenot upgrade_checkguard its siblings carry. Its only test load runs against the previousrelease server (now v26.8.2.7), which aborts on that path: no change to master can clear it
here. This closes the generated route:
--no-random-settingsis passed underupgrade_check,and the server-side profile needs
--parallel-rep, never passed here. Two tests in thereplayed corpus do set it themselves (04043, 04227), but they pin their own cluster, sat
unchanged across the clean 3454 shas, and in 90 days no
unknown streamabort in any checknames their tables. #116783's 50x
memory_tracker_fault_probabilityraise scales to ~2 runsa day, not 24.
The guard matches the sibling arms in the same function, including #116783's own
enable_cascades_optimizer. Coverage stays where a failure is actionable: the draw keepsfiring in
Stress test (*)against the PR's own build (0 of 265 shas since).Validation: 4000
get_optionsdraws per condition moveserialize_query_plan388 -> 0 underupgrade_check, leavingenable_parallel_replicasand theupgrade_check=Falsecountsunchanged. The abort does not reproduce in a local single-process pseudo-cluster (~1500
queries), so the case rests on the measurement above; #119372 has a deterministic reproducer.
cc @PedroTadim (#116783's author): the coverage it added is fine; this only keeps the setting
out of the one job that reaches a frozen release.
Workflow [PR]
Sync PR [sync-upstream/pr/119406]
Version info
26.9.1.1192(included in26.9and later)