Skip to content

Pin the subquery query result cache tests to query-based parallel replicas - #131464

Merged
devcrafter merged 2 commits into
masterfrom
pb-pin-subquery-cache-tests
Nov 14, 2026
Merged

devcrafter merged 2 commits into
masterfrom
pb-pin-subquery-cache-tests

Conversation

@devcrafter

@devcrafter devcrafter commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The subquery query result cache is not used with plan-based parallel replicas (parallel_replicas_plan_based): since #130376 the Planner does not add the cache steps whenever plan-based parallel replicas can be used for the query, also when nothing is shipped. This pins the 19 tests that expect a cached subquery to parallel_replicas_plan_based = 0, so they keep testing the cache in the plan-based parallel replicas job of #128413 instead of being listed in its blacklist. In 05141_settings_constraints_nested_settings_effective only the unconstrained user's client is pinned: the readonly users reject the setting, and their cases expect nothing cached anyway.

The pins are removed when #131463 is resolved.

Related: #131463
Related: #130376
Related: #128413

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


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

Version info

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

…licas

The subquery query result cache is not used with plan-based parallel replicas,
#131463. Pin the tests that expect a cached subquery,
so they keep testing the cache in the plan-based parallel replicas job.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e1cc844]

Summary: ✅


AI Review

Summary

The PR keeps subquery query-result-cache assertions active by setting parallel_replicas_plan_based = 0 in 17 SQL tests and the unconstrained client of 05141_settings_constraints_nested_settings_effective.sh, and excludes 04327_wait_timeout_chrono_overflow.sql from parallel-replica runs until the cache limitation is resolved. No actionable findings at e1cc84428ba7af79a0440ee1df93369e5b672ca7. The prior review reports 95/95 passing randomized runs with the pins and failures in all 19 tests without them, before the final tag adjustment. Tests were not rerun in this review.

Final Verdict

Status: ✅ Approve.

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog comp-testing Test content only (no production code). labels Nov 13, 2026
@devcrafter
devcrafter requested a review from groeneai November 14, 2026 16:04
@devcrafter devcrafter added the comp-parallel-replicas Parallel reading from replicas for query speed (not data replication consistency). label Nov 14, 2026

@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.

I ran the 19 tests on a master debug build (a33e1c16, which has #130376) with the configuration of the job from #128413: users.d/enable_parallel_replicas.xml, config.d/enable_parallel_replicas.xml and the parallel_replicas_plan_based profile, the runner with --no-parallel-replicas, and default_parallel_replicas at is_local 1/0/0.

  • PR head: 95/95 OK (19 tests x 5 randomized runs).
  • Base, without the pins: all 19 fail, 0 OK.

So every pin is needed and each one works. Two optional notes:

  1. 05141: the CONST user is not readonly (its profile constrains only use_query_cache), so it accepts --parallel_replicas_plan_based 0. With plan-based parallel replicas an unconstrained user caches nothing either (measured: 0 subquery entries without the pin, 1 with it), so in this job the CONST and RO "caches nothing" cases pass whatever the constraint does. Pinning ${CONST} like ${FREE} keeps the CONST case meaningful there. ${RO} rejects the flag (READONLY), but parallel_replicas_plan_based = 0 in ${RO_PROFILE} is accepted: the readonly user then runs query-based and still caches nothing, while the same profile without readonly caches the subquery.
  2. 04327: the pin now sits between the interactive_delay comment and its query. Above that comment, or next to the is_subquery = 1 check at the end of the file (the only part that fails without the pin), reads better.

@devcrafter
devcrafter added this pull request to the merge queue Nov 14, 2026
@devcrafter
devcrafter removed this pull request from the merge queue due to a manual request Nov 14, 2026
Only its subquery cache check depends on the implementation, and nothing in the test needs parallel replicas.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@devcrafter

Copy link
Copy Markdown
Member Author

Thanks for checking all 19. 04327: e1cc844 tags it no-parallel-replicas instead of the pin; nothing in it needs parallel replicas. 05141: kept as is: pinning ${CONST} and the readonly profile would add more to the test only for parallel replicas, and its "caches nothing" cases still hold there.

@devcrafter
devcrafter enabled auto-merge November 14, 2026 18:09
@devcrafter
devcrafter added this pull request to the merge queue Nov 14, 2026
Merged via the queue into master with commit 7908e77 Nov 14, 2026
192 checks passed
@devcrafter
devcrafter deleted the pb-pin-subquery-cache-tests branch November 14, 2026 20:27
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 14, 2026
devcrafter added a commit that referenced this pull request Nov 14, 2026
…st, regenerate the workflows

They are pinned or tagged in master since #131464
and #131666.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
valerypetrov pushed a commit to valerypetrov/ClickHouse that referenced this pull request Nov 16, 2026
…l replicas

The subquery query result cache is not used with plan-based parallel replicas,
ClickHouse#131463. `04648` and `04652` came with
ClickHouse#130375, after the other cache tests were pinned in
ClickHouse#131464.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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-not-for-changelog This PR should not be mentioned in the changelog 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.

3 participants