Skip to content

Antalya 26.8: Do not reuse a server constant built in another scope. - #2515

Merged
zvonand merged 2 commits into
antalya-26.8from
feature/antalya-26.8/pr-2471
Oct 10, 2026
Merged

zvonand merged 2 commits into
antalya-26.8from
feature/antalya-26.8/pr-2471

Conversation

@zvonand

@zvonand zvonand commented Oct 8, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fix UNION of a local query and cluster() (or another cluster function) throwing NUMBER_OF_COLUMNS_DOESNT_MATCH or THERE_IS_NO_COLUMN on GROUP BY hostName. A server constant built on the local branch was reused for the cluster branch and folded to the initiator value. Each scope now builds its own value, so shards report their own hostName, serverUUID, tcpPort, and the other server constants (#2471 by @ianton-ru).

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

Cherry-picked from #2471.


hostName captured Context::isDistributed from the first UNION branch and was then folded on a cluster branch, so the GROUP BY headers no longer matched.

Solved #1181

Documentation entry for user-facing changes

...

…next commit)

---
Original cherry-pick message follows:

Merge pull request #2471 from Altinity/bugfix/antalya-26.6/fix-union-hostname-server-constant

Do not reuse a server constant built in another scope.
# Conflicts:
#	src/Analyzer/Resolve/resolveFunction.cpp
Kept the antalya-26.8 cache condition (`isStateful` / `isDeterministicInScopeOfQuery`), which replaced the hardcoded `getSetting` / `rowNumberInAllBlocks` name checks, and added the PR's `isServerConstant` exclusion and comment on top of it.
@zvonand zvonand added releasy Created/managed by RelEasy antalya-26.8 Session label (releasy session config) forwardport This is a frontport of code that existed in previous Antalya versions ai-resolved Port conflict auto-resolved by Claude labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Workflow [PR], commit [9951eed]

@zvonand zvonand mentioned this pull request Oct 9, 2026
52 tasks done
@zvonand

zvonand commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

@blau-ai

@blau-ai blau-ai mentioned this pull request Oct 10, 2026
8 of 27 tasks
@blau-ai

blau-ai commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

CI triage for #2515

Verdict: 0 PR-caused failures. All real test suites are green (builds, Fast test, every Stateless/Integration/Stress batch, AST fuzzer, BuzzHouse, SQLLogic/SQLStorm) — including this PR's new test 05294_union_hostname_with_cluster_function (passed in Stateless tests (amd_debug, parallel), Failed: 0). The four red checks are all pre-existing / infra / flaky and unrelated to the analyzer change.

The diff is tiny and well-scoped: a 6-line guard in src/Analyzer/Resolve/resolveFunction.cpp (!function->isServerConstant()) plus the new stateless test — nothing that touches builds, packaging, container images, or the swarm suite.

Per-failure breakdown

1. Parser memory check — ERROR → infra, not PR-related.
The failing sub-step is "Resolve master binary":

No master clickhouse-examples artifact was found

The job couldn't fetch the master-branch baseline binary it diffs against, so it errored before doing any parsing work (Failures: 1/2). This is a missing-baseline-artifact problem, independent of the diff. → Safe to re-run once a master clickhouse-examples artifact is available.

2. Regression {aarch64,release} swarms — 1 failing test → pre-existing/flaky, not PR-related.
Both arch reports show the same single underlying failure (the "3 scenarios" are just the parent nodes of one leaf): /swarms/.../check cluster discovery with wrong cluster name:

Code: 279. DB::Exception: ... Cannot connect to any replica for query execution. (ALL_CONNECTION_TRIES_FAILED)
(query: SELECT hostName(), count() FROM s3Cluster('swarm', ...) GROUP BY hostName() ...)

The test deliberately queries an undiscovered/"wrong" swarm cluster and asserts on the exit code; it's hitting a connection failure instead. I checked two unrelated open PRs against antalya-26.8 and both fail the exact same swarms test with the exact same error:

So this is an environmental/flaky failure in the swarm cluster-discovery suite on the branch, not a regression from #2515. (Note: the query happens to be exactly the hostName() + cluster shape this PR targets, but the failure mode is a connection error during discovery — not a wrong result or analyzer exception, and it reproduces on PRs that don't touch the analyzer.) → No action needed on this PR; track/fix in the swarms suite separately.

3. Grype Scan (keeper: 4 high/critical, server -alpine: 1 high/critical) — image CVEs, not PR-related.
These scan the built Docker images for known CVEs in OS/base-image packages. The non-alpine server image scanned clean (0). A C++ analyzer change cannot introduce or remove these; they're inherited from the base images and are consistent across the branch. → Address at the image/dependency level if desired; not a blocker for this change's correctness.

4. PR — aggregate gate reflecting the three items above; nothing of its own.

Health check

This is a clean cherry-pick of #2471: a minimal, targeted analyzer fix (don't reuse a server constant like hostName()/serverUUID() across scopes) with a dedicated regression test that passes. No functional, build, or integration regressions. The remaining red checks are baseline/infra (Parser memory check, Grype) and a known-flaky swarm test that fails identically on unrelated PRs. Nothing here requires a code change to #2515 — the swarms and Parser-memory jobs can be re-run / handled at the infra level.

Evidence: praktika report result_pr.json and swarms report.html for head 9951eed; comparison runs on #2522 and #2507.

@zvonand
zvonand merged commit 50ea4fb into antalya-26.8 Oct 10, 2026
492 of 508 checks passed
@zvonand zvonand added verified Approved for release port-antalya PRs to be ported to all new Antalya releases labels Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-resolved Port conflict auto-resolved by Claude antalya-26.8 Session label (releasy session config) forwardport This is a frontport of code that existed in previous Antalya versions port-antalya PRs to be ported to all new Antalya releases releasy Created/managed by RelEasy verified Approved for release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants