Repository navigation
Antalya-26.8: Iceberg: support external paths in tables - #2551
Conversation
Iceberg: support external paths in tables Adaptations to antalya-26.8: - The drop flow here is `prepareForDrop(query_context)` + `IDataLakeMetadata::drop(bool delete_data)` (from the backport of PR 98670), not upstream's `drop(ContextPtr)`. `checkCanBeDropped` keeps the PR's `checkTableCanBeDropped` hook, reads `data_lake_delete_data_on_drop` from the query context (`iceberg_delete_data_on_drop` is only an alias here), and `drop(bool)` enumerates the external files with the global context. `StorageIcebergConfiguration` forwards `checkCanBeDropped` like `drop`. - `DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION_WITH_ICEBERG_ABSOLUTE_PATH` keeps upstream's number 12; versions 10 (CDC reading) and 11 (deletion vectors) do not exist here, so the branch jumps from 9 to 12. The protocol spec text drops the mention of version 11. - `Settings.cpp` here has no inline settings-changes history, so the entry for `object_storage_propagate_credentials_to_other_storages` is recorded in `SettingsChangesHistory.cpp` (`26.6.2.20001.altinityantalya` section, as the previous backport did). - `ObjectStorageFactory::create` takes a single `skip_access_check` here; `AzureObjectStorage` takes `auth_method`; `S3::URI` and `getManifestFile` keep their extra branch-specific parameters. - Deletion vectors are loaded on the coordinator in `IcebergIterator` here (no `deletion_vector` in `IcebergObjectSerializableInfo`, no `readIcebergDeletionVector`), so the storage resolution for the Puffin file is applied to `loadDeletionVector` and the deletion-vector parts of the protocol serialization and of the cluster compatibility check are dropped. The serde unit test uses protocol version 9 as the "old" version. - `collectReachableFiles` has no catalog parameters here; `remove_orphan_files` keeps the version-based TOCTOU check (no `metadata_path` in `ReachableFilesResult`). - `totalRows` here never uses the snapshot summary; only the `isPathReadable` check is added. - `AlterDropPartitionExecutor`, `test_cross_bucket_data_files.py`, `05043_object_storage_path_virtual_column_empty_namespace` and the documentation block in `TableFunctionObjectStorage.cpp` do not exist here; the PR's changes to them are dropped. `DatabaseDataLake::buildTableEngineArgs` does not exist; the `Local` storage exemption is applied to the equivalent credentials check. - Upstream-only context (masked URI helpers in `URI.cpp`, foreign-namespace helpers in `IcebergPath.cpp`, row-lineage code, `makeQueryConditionCacheKey`, `read_settings` in the position-delete transform) is not pulled in.
The cherry-pick of ClickHouse#90740 took upstream's `DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION` slot 12 for sending the Iceberg delete-file paths as absolute URIs in the cluster read-task payload. Antalya versions its own wire changes with `DBMS_ANTALYA_PROTOCOL_VERSION`, negotiated per connection in the `Hello` (#2487), so the upstream bump is undone and the change is gated on Antalya protocol version 2 instead. The negotiated version of the worker is passed from `Connection` through `ClusterFunctionReadTaskResponse::serialize` to `IcebergObjectSerializableInfo::serializeForClusterFunctionProtocol`.
Compare the literal legacy wire key with the resolved delete-file key. Require Antalya protocol version 2 when they differ, including copied tables, instead of resolving the stripped key again. Remove the exception-catching fallback. Correct the cluster protocol specification to version 9 and cover copied-table paths and Antalya versions 0, 1, and 2. Built `clickhouse` and `unit_tests_dbms`; all 31 focused tests passed. Related: #2551
Port the approach of #2268 to the `test_external_paths_cross_bucket.py` version of the test: instead of corrupting `record_count` and dropping `total-records`, write a live merge-on-read position delete file so that `count()` has to scan the data files, and relocate only the data file without deletes to the shared key in the other bucket. Related: #2268
…ckport/antalya-26.8/90740
This comment was marked as outdated.
This comment was marked as outdated.
CI triageVerdict: 6 failing checks, 0 caused by this PR. All are pre-existing / infra / flaky on No code change is needed on this PR. Details per failure below. Not PR-related (infra / build-env)Grype Scan — keeper (4 High/Crit), server Parser memory check — "Failures: 1/2" Not PR-related (regression-suite env / stale assertions / flake)Regression → oauth — test-expectation bug, server behaves correctly. Regression → s3_azure_1 — environment, server won't start. Regression → swarms — single flaky negative scenario. Regression → tiered_storage_cas — build/feature gap, server won't start. Why the PR's non-Iceberg changes don't explain any of theseThe diff does touch Access/Connection/protocol, but narrowly:
Suggested next stepNothing to fix in this PR. The red checks are safe to re-run / ignore for merge purposes. The oauth (stale 500-vs-403 assertion), s3_azure ( |
Iceberg: support external paths in tables
Adaptations to antalya-26.8:
prepareForDrop(query_context)+IDataLakeMetadata::drop(bool delete_data)(from the backport of PR 98670), not upstream'sdrop(ContextPtr).checkCanBeDroppedkeeps the PR'scheckTableCanBeDroppedhook, readsdata_lake_delete_data_on_dropfrom the query context (iceberg_delete_data_on_dropis only an alias here), anddrop(bool)enumerates the external files with the global context.StorageIcebergConfigurationforwardscheckCanBeDroppedlikedrop.DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION_WITH_ICEBERG_ABSOLUTE_PATHkeeps upstream's number 12; versions 10 (CDC reading) and 11 (deletion vectors) do not exist here, so the branch jumps from 9 to 12. The protocol spec text drops the mention of version 11.Settings.cpphere has no inline settings-changes history, so the entry forobject_storage_propagate_credentials_to_other_storagesis recorded inSettingsChangesHistory.cpp(26.6.2.20001.altinityantalyasection, as the previous backport did).ObjectStorageFactory::createtakes a singleskip_access_checkhere;AzureObjectStoragetakesauth_method;S3::URIandgetManifestFilekeep their extra branch-specific parameters.IcebergIteratorhere (nodeletion_vectorinIcebergObjectSerializableInfo, noreadIcebergDeletionVector), so the storage resolution for the Puffin file is applied toloadDeletionVectorand the deletion-vector parts of the protocol serialization and of the cluster compatibility check are dropped. The serde unit test uses protocol version 9 as the "old" version.collectReachableFileshas no catalog parameters here;remove_orphan_fileskeeps the version-based TOCTOU check (nometadata_pathinReachableFilesResult).totalRowshere never uses the snapshot summary; only theisPathReadablecheck is added.AlterDropPartitionExecutor,test_cross_bucket_data_files.py,05043_object_storage_path_virtual_column_empty_namespaceand the documentation block inTableFunctionObjectStorage.cppdo not exist here; the PR's changes to them are dropped.DatabaseDataLake::buildTableEngineArgsdoes not exist; theLocalstorage exemption is applied to the equivalent credentials check.URI.cpp, foreign-namespace helpers inIcebergPath.cpp, row-lineage code,makeQueryConditionCacheKey,read_settingsin the position-delete transform) is not pulled in.Changelog category (leave one):
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. The
_pathvirtual column for Iceberg data files now reports the path as written in the Iceberg manifest (for examples3://bucket/table/data/p.parquet) instead of the previousnamespace/keyform, andsystem.iceberg_files.file_pathreports it the same way.CI/CD Options
Exclude tests:
Regression jobs to run: