Skip to content

Backport #113742 to 26.3: Skip the custom-key parallel replicas read when the requested stage cannot absorb finalized data - #114808

Merged
alexey-milovidov merged 2 commits into
26.3from
backport/26.3/113742
Aug 15, 2026
Merged

alexey-milovidov merged 2 commits into
26.3from
backport/26.3/113742

Conversation

@robot-clickhouse-ci-2

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #113742
Cherry-pick pull-request #114632

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.3.18.31

…when the requested stage cannot absorb finalized data
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Aug 14, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [ea491a7]

Summary: ✅

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114808&sha=c67ef51c4b48c480fb6979d253bd10d293d31887&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29 and provide a fix in a separate PR. If the fix is already in progress, link it here. The failure is Tests/04238_alter_rename_column_merge_race, unrelated to this backport.

@groeneai

Copy link
Copy Markdown
Collaborator

Fix: #114913 (the 26.3-only one-liner you authorized in #113929 (comment)).

Confirming it is unrelated to this backport: your diff is src/Planner/PlannerJoinTree.cpp plus a 04815_parallel_replicas_custom_key_* test, with no path to ALTER RENAME COLUMN or merge metadata.

The failure is the data-loss facet of issue 80648, not a timeout: expected 10 non-empty rows, got 0, Reason: return code: 1. It is confined to 26.3 (last 14 days: 14 failures, all on 26.3 or backport/26.3/*, 0 with pull_request_number = 0 AND head_ref = 'master'; the same job arm is 141 OK / 14 FAIL, so it runs and mostly passes). Runtime is not the trigger publicly: 37593 runs over 7 days, p99 168.7s, max 321.3s, none above the 600s budget.

Root cause as recorded on 113929: StorageMergeTree::optimize runs merge selection on the query thread, and on 26.3 getInMemoryMetadataPtr still has a defaulted bypass_metadata_cache, so the cherry-picked call reads the per-query cached pre-ALTER snapshot. 26.4 and later declare the accessor with no default, which is why they are unaffected.

@alexey-milovidov
alexey-milovidov merged commit 3a0c1c4 into 26.3 Aug 15, 2026
35 checks passed
@alexey-milovidov
alexey-milovidov deleted the backport/26.3/113742 branch August 15, 2026 15:32
bytehalo-infra added a commit to sentioxyz/ClickHouse that referenced this pull request Sep 25, 2026
CTE/AN/QP: Merge with a Distributed child under custom-key parallel replicas -> exc.
Effect in the production build a394e92: its upstream test(s) 04815_parallel_replicas_custom_key_merge_distributed_child fail on it and pass on official 26.8.8.8, run on isolated servers (evidence/fix_ci_20260925/upstream_repro/server_triage_PROD263_vs_UP2688.tsv).
Upstream patch unchanged, with its test(s): 04815_parallel_replicas_custom_key_merge_distributed_child.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants