Skip to content

Antalya 26.6: Iceberg: support external paths in tables - #2154

Open
zvonand wants to merge 2 commits into
antalya-26.6from
feature/antalya-26.6/ClickHouse-ClickHouse-pr-90740
Open

Antalya 26.6: Iceberg: support external paths in tables#2154
zvonand wants to merge 2 commits into
antalya-26.6from
feature/antalya-26.6/ClickHouse-ClickHouse-pr-90740

Conversation

@zvonand

@zvonand zvonand commented Aug 3, 2026

Copy link
Copy Markdown
Member

Dropped from this backport: the AI dropped these surfaces rather than pulling in a missing prerequisite. Reviewers: confirm each is genuinely optional.

  • manifest-only compaction integration (compactIcebergManifests, writeConsolidatedManifestFile, isCurrentManifestListAboveThreshold, IcebergMetadata::optimizeManifestFiles) — that feature is not on antalya-26.6, only the PR's edits to it were dropped
  • query-condition-cache keying by the Iceberg metadata path (makeQueryConditionCacheKey, ObjectInfo::getIdentifier(bool)/getIdentifierForPath(path, bool) overloads) — depends on upstream query-condition-cache/ETag work not on antalya-26.6
  • gtest_storage_object_storage_archive.cpp update — that test file does not exist on antalya-26.6

Changelog category (leave one):

  • Improvement

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

Support Iceberg tables that have files outside table location or on different storage (ClickHouse#90740 by @zvonand).

Cherry-picked from ClickHouse#90740.


Closes ClickHouse#84609

Current logic is that all table files (data files, manifests, manifest lists) shall be "inside" the table location, in the same storage. This PR abandons that logic: now files can be located anywhere, even on a different storage type (e.g. all metadata is on s3, data file in in local storage).

In some cases, that old logic shoots back: even incorrect (non-existing) paths, i.e. with redundant items in a prefix were parsed in such a way that files from another locations were read (/path/to/item was read when the specified location was /path/to/to/item or vice versa)

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Note

High Risk
Touches Iceberg metadata iteration/compaction/expiry and distributed cluster-function serialization, plus adds dynamic secondary storage creation and optional credential propagation; regressions could lead to wrong files being read or deleted across storages/endpoints.

Overview
Enables Iceberg tables to reference absolute paths and files outside the table location, including files stored on different object storage backends (S3/Azure/HDFS/local). Iceberg manifest/manifest-list handling is updated to treat metadata paths as absolute URIs, resolve them at read/delete time via new object-storage utilities, and carry resolved storage info through iterators/transforms/compaction/expire-snapshots.

Bumps cluster-function processing protocol to add Iceberg absolute-path support and extends IcebergObjectSerializableInfo to transmit both the metadata path and absolute path (with a coordinator-side guard for old workers when external storage is required). Also adds _path/task distribution handling to prefer absolute paths when available.

Introduces new object-storage helpers (SchemeAuthorityKey, makeAbsolutePath, resolveObjectStorageForPath, SecondaryStorages) and a setting s3_propagate_credentials_to_other_storages to optionally copy base S3 credentials when creating secondary storages. Adds an integration test covering multi-storage Iceberg layouts and updates existing test metadata paths accordingly.

Written by Cursor Bugbot for commit 66d1acc. This will update automatically on new commits. Configure here.

zvonand added 2 commits August 3, 2026 18:36
Kept the antalya-26.6 side for everything outside the source PR's scope
(older cluster-protocol version list, non-lambda iceberg_metadata_log->add,
4-arg createReadBuffer, string-path tryGetObjectMetadata/getObjectMetadata,
try/catch around generateManifestList in Mutations, no manifest-only
compaction) and applied the PR's changes on top of it.

Also removed the upstream 26.7/26.8 SettingsChangesHistory blocks that the
three-way merge re-introduced into antalya-26.6's registry, and uncommented
the existing Antalya placeholder row for the PR's new setting instead of
adding a duplicate.

Adapted: ObjectInfo::getIdentifierForPath(path) added on antalya-26.6 (getIdentifier() refactored to use it) because the PR's getSchedulingIdentifier() relies on that accessor, which only exists upstream
Adapted: createReadBuffer / tryGetObjectMetadata / getObjectMetadata call sites keep antalya-26.6's argument shapes (string path, no read_settings/headers args) and only swap the object storage for the resolved one
Adapted: generateManifestList call sites keep antalya-26.6's signature (per-call content_type, no per_entry_content_types) and only pass the new secondary_storages argument
Adapted: manifest_file_cache_keys.emplace_back keeps antalya-26.6's 5-field ManifestFileCacheKey (no partition_spec_id)
Adapted: Iceberg/Utils.h needs an explicit #include <optional> for the new always-available declarations, since antalya-26.6 had it only inside the USE_AVRO block
Dropped: manifest-only compaction integration (compactIcebergManifests, writeConsolidatedManifestFile, isCurrentManifestListAboveThreshold, IcebergMetadata::optimizeManifestFiles) — that feature is not on antalya-26.6, only the PR's edits to it were dropped
Dropped: query-condition-cache keying by the Iceberg metadata path (makeQueryConditionCacheKey, ObjectInfo::getIdentifier(bool)/getIdentifierForPath(path, bool) overloads) — depends on upstream query-condition-cache/ETag work not on antalya-26.6
Dropped: gtest_storage_object_storage_archive.cpp update — that test file does not exist on antalya-26.6
@zvonand zvonand added releasy Created/managed by RelEasy antalya-26.6 ai-resolved Port conflict auto-resolved by Claude labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Workflow [PR], commit [713a9b0]

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.6 releasy Created/managed by RelEasy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant