Skip to content

Fix metadata initialize for complex engines over cluster request. - #2550

Merged
mkmkme merged 10 commits into
antalya-26.6from
bugfix/antalya-26.6/alias-iceberg-cluster-metadata
Oct 14, 2026
Merged

mkmkme merged 10 commits into
antalya-26.6from
bugfix/antalya-26.6/alias-iceberg-cluster-metadata

Conversation

@ianton-ru

Copy link
Copy Markdown

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 metadata initialize for complex engines over cluster request.

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

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

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

ianton-ru and others added 3 commits October 12, 2026 13:41
DataLakeCatalog builds a fresh storage on every lookup, so object_storage_cluster file listing ran before the snapshot was loaded and threw "Metadata is not initialized".

Co-authored-by: Cursor <[email protected]>
…e_cluster.

Alias, Buffer, Merge, materialized views, loop, and Distributed all resolve a fresh catalog storage, so each one is checked the same way for local, query, and database cluster settings.

Co-authored-by: Cursor <[email protected]>
The customer filter, limit, and count checks now run against the REST catalog and cluster_simple, including parallel replicas, so the stateless REST stub is no longer needed.

Co-authored-by: Cursor <[email protected]>
@ianton-ru

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T15:14:14.588387Z 2a09ee3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [43952da]

@ianton-ru ianton-ru added antalya bugfix port-antalya PRs to be ported to all new Antalya releases antalya-26.6 labels Oct 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e85333854

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3095 to +3098
Customer repro moved from the stateless suite. An Alias over a catalog Iceberg
table must apply the same filter as a direct catalog read: local, with
object_storage_cluster, and with parallel replicas. count() is the path that
already succeeded before snapshot initialization on the cluster file listing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Format literal ClickHouse names in the docstrings

These new docstrings use literal SQL engine and setting names as plain prose—for example, Alias, Iceberg, and object_storage_cluster—while repository guidance requires ClickHouse language names in comments and documentation to be formatted as inline code; apply that formatting throughout both added docstrings.

AGENTS.md reference: AGENTS.md:L7-L7

Useful? React with 👍 / 👎.

@ianton-ru

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15eceeb40b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ianton-ru

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 2a09ee317a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ianton-ru
ianton-ru marked this pull request as ready for review October 12, 2026 15:19
@mkmkme

mkmkme commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

@blau-ai

mkmkme

This comment was marked as outdated.

@mkmkme
mkmkme self-requested a review October 13, 2026 06:46
`StorageSnapshot` only referenced the target, and `DataLakeCatalog` drops that storage when `getStorageSnapshot` returns. The analyzer then read freed memory under ASan.

https: //altinity-build-artifacts.s3.amazonaws.com/json.html?PR=2550&sha=2a09ee317a90d65f72165bbb9f1c4d407ec41c48&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%208%2F8%29
Related: #2550
Co-authored-by: Cursor <[email protected]>
@mkmkme

mkmkme commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

This PR requires #2557 to be merged as well for the issue to be properly solved.

mkmkme and others added 3 commits October 13, 2026 18:42
`getTargetTable` returns a `StoragePtr` that can be the only owner of a catalog storage. Destroying it before `isMergeTree` was a heap-use-after-free under AddressSanitizer.

Related: #2550
https: //altinity-build-artifacts.s3.amazonaws.com/json.html?PR=2550&sha=bb444f10dd1de59c9ae3adcf33540371cedf6c5b&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%208%2F8%29
Co-authored-by: Cursor <[email protected]>
@ianton-ru

Copy link
Copy Markdown
Author

@blau-ai

@blau-ai

blau-ai commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

CI triage for 43952da

Verdict: 5 red checks, 0 caused by this PR. All are pre-existing flakes / infra timeouts. There is nothing to fix in the diff. The one actionable item is that this PR's own new integration tests never actually ran (the shard they'd run in timed out), so the bugfix hasn't been validated by CI yet — a plain re-run of the integration job is what you need, not a code change.

The diff only touches two guarded paths — the datalake branch in StorageObjectStorageSource::createFileIterator (isDataLakeConfiguration()-gated lazyInitializeIfNeeded) and the parallel-replicas-over-view storage lifetime in parallelReplicasEnabledForStorage. None of the failing tests exercise either path.


1. Stateless tests (amd_asan_ubsan, cas s3 storage, parallel, 2/2) — 02435_rollback_cancelled_queries

--- Failure reproducibility check ---
Failed 0 out of 3 reruns.

Flaky, not PR-related. The reproducibility check reran it 3× and it passed every time. The test is a pure MergeTree INSERT cancel/rollback timing test (the diff shows a stray system.processes row for a not-yet-cancelled insert) — it has nothing to do with datalake metadata or parallel replicas. → Safe to re-run (it already self-recovered on rerun).

2. Integration tests (amd_asan_ubsan, db disk, old analyzer, 4/8) — "interrupted (exit status: 2)"

!!!!!! xdist.dsession.Interrupted: session-timeout: 10800.0 sec exceeded !!!!!!!
ERROR: command failed after 1/1 attempt(s), exit code: 2

Infra timeout, not PR-related. The whole shard blew the 3-hour xdist session limit while still inside test_storage_iceberg_with_spark (job wall-clock 3h12m). Grepping the job log, test_database_iceberg/test.py:: never produced a single run line — i.e. your new tests (test_alias_iceberg_catalog_cluster, test_datalake_catalog_wrapper_object_storage_cluster) were never reached, so they neither caused nor could have caused this timeout. This is a pre-existing capacity problem of the heavy spark/postgres iceberg shard. → Re-run the shard. But note the consequence below.

3. Stress test (amd_debug, cas s3 storage) — "Cannot start clickhouse-server"

test_results.tsv:  Test script exit code  OK
                   Cannot start clickhouse-server  FAIL

Infra/flaky restart, not PR-related. The stress scenario itself passed (script exit OK, hung-check clean, "No queries hung"); the failure is the post-stress server restart not answering SELECT 1 within the ~110 s probe window. fatal.log and application_errors.txt are both empty, and the server err log has no signal / sanitizer / Ready for connections-failure — in fact server log lines (BlobKillerThread cleanup) keep appearing right after the "Cannot start" verdict, i.e. the debug build + experimental CAS-S3 disk was just slow to come back up. Nothing in the diff affects startup. → Safe to re-run.

4. Regression release swarms — 1 scenario failed

/node failure/check restart swarm node → Fail (1m50s)
AssertionError: Oops! Assertion failed

Flaky chaos test, not clearly PR-related. 1520/1535 scenarios passed; the only failure is a fault-injection scenario that kills and restarts a swarm node and asserts recovery — inherently timing-sensitive. All the datalake-relevant regression suites that would catch a real bug here are green: iceberg_1, iceberg_2, parquet, parquet_aws_s3, s3_export_part, s3_export_partition. → Re-run swarms.

5. RegressionTestsRelease / ParquetS3 (minio) / parquet_minio

Incomplete/timed-out job (~3h31m), not PR-related. The GH-Actions job has conclusion: null / completed_at: null (never finished), and there is no framework-level Regression release parquet_minio failure status, while its siblings Regression release parquet and Regression release parquet_aws_s3 both report success. Consistent with an infra timeout on the minio variant, not a test regression. → Re-run.


Recommendation

  • No code change is warranted — none of the failures trace to the diff.
  • Just re-run the five red jobs; Update README.md #1 already passed on its own reruns.
  • ⚠️ Important for this PR specifically: because the integration shard (Update README.md #2) timed out before reaching test_database_iceberg, the new tests that validate this bugfix did not execute. Until that shard finishes, there's no green signal that the Alias/object_storage_cluster/parallel-replicas-over-catalog paths are actually fixed. If the shard keeps hitting the 3h limit on re-run, consider whether the new test_datalake_catalog_wrapper_object_storage_cluster matrix (7 engines × 3 cluster modes ≈ 21 cases) should live in a lighter/less-loaded integration group so it can reliably run to completion.

🤖 Automated CI triage by @blau-ai. Evidence: praktika result_pr.json, job logs, and regression reports for 43952dafab9f5b1926d9d81f35fdbe28d635b181. I can't build/run ClickHouse in this container, so correctness of the fix must come from a green integration run on the PR.

@mkmkme mkmkme added the verified Approved for release label Oct 14, 2026
@mkmkme
mkmkme merged commit 9b6bc31 into antalya-26.6 Oct 14, 2026
473 of 483 checks passed
@ianton-ru ianton-ru removed the port-antalya PRs to be ported to all new Antalya releases label Oct 15, 2026
@zvonand zvonand mentioned this pull request Oct 16, 2026
58 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants