Skip to content

Pin the parallel replicas checks that only the query-based implementation passes - #127396

Merged
devcrafter merged 3 commits into
masterfrom
pin-query-based-specific-pr-checks
Oct 24, 2026
Merged

devcrafter merged 3 commits into
masterfrom
pin-query-based-specific-pr-checks

Conversation

@devcrafter

@devcrafter devcrafter commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Description

Four tests fail with parallel_replicas_plan_based = 1 because they check what only the query-based implementation of parallel replicas does. The plan-based behaviour is correct there, so the affected queries are pinned with parallel_replicas_plan_based = 0. The rest of each test still runs on the default implementation.

  • 05401_autopr_set_transplant_unpaired_sets: the test relies on shipping a query tree, where long constants become __getScalar and the IN set loses its counterpart. The plan-based implementation ships a plan fragment, the sets hash alike, and the query switches with the same result. The four 05401_long_* and 05401_all_* queries are pinned; the join pair is not.
  • 05331_autopr_plan_builder_skip_reasons: the skip by query shape looks at the query tree. The plan-based implementation decides on the plan, builds it, and finds no read for the other replicas in it. Only autopr_builder_skip_shape is pinned.
  • 05288_ast_fuzzer_skips_collaborative_worker: the skip is counted on a worker that parses the statement it was sent. A plan-based worker receives a plan fragment and has no AST to fuzz, so it never reaches the skip; the workers are still not fuzzed. The two INSERT ... SELECT and the view read are pinned; the fileCluster arm is not.
  • 05320_parallel_replicas_right_join_right_any: the two checks look for ReadFromRemoteParallelReplicas, the step name of the query-based implementation. The plan-based implementation is already checked by the queries below them.

All four pass with parallel_replicas_plan_based set to 1 and to 0.

This is part of enabling a CI run with plan-based parallel replicas.

Related: #112351

Changelog category (leave one):

  • CI Fix or Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/127396]

Version info

  • Merged into: 26.11.1.737-master (included in 26.11 and later)

…tion passes

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [cc8cb02]

Summary: ✅


AI Review

Summary

This PR pins implementation-specific assertions in four stateless tests to parallel_replicas_plan_based = 0, preserving their regression checks while allowing other queries to use the configured implementation. No actionable findings. All four changed tests pass in the current CI Fast test report; the existing review also reports repeated passes with both setting values.

Final Verdict

Status: ✅ Approve.

@clickhouse-gh clickhouse-gh Bot added pr-ci comp-testing Test content only (no production code). labels Oct 22, 2026
@devcrafter
devcrafter requested a review from nickitat October 22, 2026 13:54
@devcrafter devcrafter added the comp-parallel-replicas Parallel reading from replicas for query speed (not data replication consistency). label Oct 22, 2026
@devcrafter
devcrafter requested a review from groeneai October 22, 2026 13:54

@groeneai groeneai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pins keep the intent of the two tests I wrote.

  • 05288: without the pins, at parallel_replicas_plan_based = 1 only the three *_skips_recorded lines flip to 0. The workers_ran, not_fuzzed and no_internal_workers lines still pass, so plan-based workers are not fuzzed either; the pinned arms only give up a counter the plan-based path never reaches.
  • 05320: at plan_based = 1 the positive control goes 1 -> 0, and the first check passes vacuously, since the plan-based implementation has no ReadFromRemoteParallelReplicas step at all. The three plan-based checks below already cover the refusal, the row threshold and the positive control.

Measured with the master binary (31d10e5ef277), a local server with process_query_plan_packet on, 5 randomized runs per arm. With this PR: 40/40 OK at parallel_replicas_plan_based 1 and 0. On the base: 20/20 FAIL at 1 (all result diffs), 20/20 OK at 0.

@devcrafter

Copy link
Copy Markdown
Member Author

@groeneai Update this pr with fresh master as soon as #127515 is merged

@groeneai

Copy link
Copy Markdown
Collaborator

I can't do that one: I don't have write access to this repository, so I can't push to pin-query-based-specific-pr-checks. The master merge has to come from you once #127515 lands (it is still waiting on CI, auto-merge is on).

It should be a clean merge: a three-way merge of 05401_autopr_set_transplant_unpaired_sets.sql from both heads (850f917, e79354c) has no conflicts. #127515 only adds the Random settings limits header at the top of the file; your parallel_replicas_plan_based = 0 pins are further down.

@devcrafter
devcrafter enabled auto-merge October 24, 2026 16:30
@devcrafter
devcrafter added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 06be024 Oct 24, 2026
179 checks passed
@devcrafter
devcrafter deleted the pin-query-based-specific-pr-checks branch October 24, 2026 18:31
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 24, 2026
@clickhouse-gh clickhouse-gh Bot removed the comp-testing Test content only (no production code). label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-parallel-replicas Parallel reading from replicas for query speed (not data replication consistency). pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants