Skip to content

Antalya 26.3 Backport of #102113 - Fix LOGICAL_ERROR in Iceberg mutations due to missing datalake_table_state#1767

Merged
zvonand merged 1 commit into
antalya-26.3from
backports/antalya-26.3/102113
May 12, 2026
Merged

Antalya 26.3 Backport of #102113 - Fix LOGICAL_ERROR in Iceberg mutations due to missing datalake_table_state#1767
zvonand merged 1 commit into
antalya-26.3from
backports/antalya-26.3/102113

Conversation

@mkmkme
Copy link
Copy Markdown
Collaborator

@mkmkme mkmkme commented May 9, 2026

Fix LOGICAL_ERROR in Iceberg mutations due to missing datalake_table_state

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 server crash (LOGICAL_ERROR) when executing ALTER TABLE UPDATE/DELETE on Iceberg tables when no prior SELECT or INSERT was done on the table in the same server lifetime (ClickHouse#102113 by @alexey-milovidov)

Documentation entry for user-facing changes

...

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)

…te-table-state

Fix LOGICAL_ERROR in Iceberg mutations due to missing datalake_table_state
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Workflow [PR], commit [9f4955e]

@il9ue
Copy link
Copy Markdown

il9ue commented May 11, 2026

LGTM — clean backport ✅

Diff matches upstream [#102113](ClickHouse#102113) exactly (final merged commit ae2859e), no backport conflicts.

Fix: One-line updateExternalDynamicMetadataIfExists(context_) at the top of StorageObjectStorage::mutate, mirroring the pattern in InterpreterInsertQuery and StorageMaterializedView::read.

Test: Final iteration after several rounds of bugfix-validation upstream — IcebergS3 (not Local, which goes read-only after ATTACH), DETACH/ATTACH to simulate restart, and --validate_mutation_query=0 to avoid MutationsInterpreter::validate masking the bug via its internal InterpreterSelectQuery. Comments capture all of this well.

CI selection looks right: Iceberg, Parquet, S3 Export, Swarms enabled; ASAN kept. Approve once green.

@il9ue il9ue self-requested a review May 11, 2026 12:34
@alsugiliazova
Copy link
Copy Markdown
Member

Verification: PR #1767

Title: Antalya 26.3 Backport of ClickHouse#102113 — Fix LOGICAL_ERROR in Iceberg mutations due to missing datalake_table_state
Base: antalya-26.3backports/antalya-26.3/102113
Head: 9f4955e1c18a2ea943383049377a355c86be2646
Size: +59 / -0 across 3 files · State: OPEN · Mergeable

Changes

  • src/Storages/ObjectStorage/StorageObjectStorage.cpp — production fix for missing datalake_table_state during Iceberg mutations (avoids LOGICAL_ERROR when mutating without a prior SELECT).
  • tests/queries/0_stateless/04092_iceberg_mutate_without_prior_select.shnew dedicated stateless test added by this PR.
  • tests/queries/0_stateless/04092_iceberg_mutate_without_prior_select.reference — expected output for the new test.

PR-added test

04092_iceberg_mutate_without_prior_selectpasses 100% (6/6 runs) across every stateless job that picked it up:

  • Stateless tests (amd_asan, distributed plan, parallel, 1/4) — OK
  • Stateless tests (amd_debug, distributed plan, s3 storage, parallel) — OK
  • Stateless tests (amd_debug, parallel) — OK
  • Stateless tests (arm_asan, azure, parallel, 1/4) — OK
  • Stateless tests (arm_asan, targeted) — OK
  • Stateless tests (arm_binary, parallel) — OK
  • Fast test — SKIPPED (expected; not selected by fast-test filter)

The new code path has clean positive coverage.

CI overview (head commit)

  • PR test workflow: 44 success / 49 skipped / 7 failure
  • Regression workflow: 28 success / 68 skipped / 4 failure (chronic baseline)
  • One pending action_required job (queue/auth, not a real failure)

PR test-workflow failures

Check Verdict
Integration tests (amd_asan, db disk, old analyzer, 3/6) — 24 × test_s3_cluster/test.py::* Cascade failure, not PR-caused. All 24 tests fail at the same timestamp 2026-05-09 08:30:11 (server-died pattern). The same test_s3_cluster shard cascade is recurring across antalya-26.3 PRs 1773, 1772, 1757, 1741, 1731, 1692 in the last 30 days. The PR diff does not touch s3Cluster, only Iceberg mutation state.
Integration tests (amd_asan, db disk, old analyzer, 2/6) Job-level error, no test rows in DB.
Stress test (amd_debug)Test script failed Job-level (not test) failure; sporadic infra on the branch.

Regression-workflow failures (chronic baseline on antalya-26.3)

Suite Result
Swarms (Aarch64 + Release) 227 fails — chronic baseline (initiator out of disk space, etc.)
Parquet (Aarch64 + Release) 34 fails — chronic baseline
S3Export partition (Aarch64 + Release) 20 fails — chronic baseline
S3Export part (Aarch64 + Release) 14 fails — chronic baseline

Same fingerprint observed on every recent antalya-26.3 PR. No new failure modes introduced.

Caveat — partial frontport

This PR lands on antalya-26.3 where several companion features from antalya-26.1 are still being frontported in parallel. Some regression suites still rely on settings/CLI args that are not yet wired in this base, so a final re-verify is recommended once the rest of the frontport bundle lands.

Verdict

Safe to merge.

  • PR’s own test 04092_iceberg_mutate_without_prior_select passes 100% across all stateless jobs.
  • No PR-caused test regressions.
  • All failing checks are pre-existing flakes / chronic baseline failures shared with sibling antalya-26.3 PRs.

@alsugiliazova
Copy link
Copy Markdown
Member

Audit: PR #1767 — Antalya 26.3 Backport of #102113 — Fix LOGICAL_ERROR in Iceberg mutations due to missing datalake_table_state

AI audit note: This review comment was generated by AI (Cursor agent, audit-review skill).

Confirmed defects

No confirmed defects in reviewed scope.

@alsugiliazova alsugiliazova added the verified Approved for release label May 11, 2026
@zvonand zvonand merged commit 10a4bfb into antalya-26.3 May 12, 2026
289 of 313 checks passed
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.

6 participants