Skip to content

Antalya 26.5: Forward port of export part and partition#1963

Open
zvonand wants to merge 11 commits into
antalya-26.5from
feature/antalya-26.5/pr-1713
Open

Antalya 26.5: Forward port of export part and partition#1963
zvonand wants to merge 11 commits into
antalya-26.5from
feature/antalya-26.5/pr-1713

Conversation

@zvonand

@zvonand zvonand commented Jun 25, 2026

Copy link
Copy Markdown
Member

Auto-ported prerequisites: RelEasy detected that the requested port depended on PR(s) not yet on the target branch and auto-ported them first (6 PR(s) added). Reviewers: please confirm the prereq scope is appropriate.

Changelog category (leave one):

  • New Feature

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

Forward port of export part and partition #1041, #1083, #1086, #1090, #1106, #1124, #1144, #1147, #1150, #1157, #1158, #1161, #1167, #1229, #1294, #1320, #1324 and #1330 (#1388 by @arthurpassos, #1402 by @arthurpassos, #1490 by @arthurpassos, #1499 by @arthurpassos, #1593 by @arthurpassos, #1618 by @arthurpassos, #1713 by @arthurpassos).

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)

Combined port of 7 PR(s) (group pr-1713). Cherry-picked from #1388, #1402, #1490, #1499, #1593, #1618, #1713.

zvonand added 11 commits June 25, 2026 02:56
…next commit)

---
Original cherry-pick message follows:

Merge pull request #1388 from Altinity/fp_antalya_26_1_export_part_partition

Antalya 26.1 - Forward port of export part and partition
# Conflicts:
#	src/Common/ErrorCodes.cpp
#	src/Common/ProfileEvents.cpp
#	src/Common/setThreadName.h
#	src/Core/ServerSettings.cpp
#	src/Core/Settings.cpp
#	src/Core/SettingsEnums.cpp
#	src/Core/SettingsEnums.h
#	src/Interpreters/ClientInfo.h
#	src/Parsers/ASTAlterQuery.cpp
#	src/Storages/IPartitionStrategy.cpp
#	src/Storages/IPartitionStrategy.h
#	src/Storages/MergeTree/IMergeTreeDataPart.cpp
#	src/Storages/MergeTree/MergeTreeData.cpp
#	src/Storages/MergeTree/MergeTreeData.h
#	src/Storages/MergeTree/ReplicatedMergeTreeRestartingThread.cpp
#	src/Storages/ObjectStorage/StorageObjectStorage.cpp
#	src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp
#	src/Storages/ObjectStorage/StorageObjectStorageConfiguration.cpp
#	src/Storages/ObjectStorage/StorageObjectStorageConfiguration.h
#	src/Storages/StorageMergeTree.cpp
#	src/Storages/StorageReplicatedMergeTree.h
#	src/Storages/System/StorageSystemMerges.cpp
#	src/Storages/System/attachSystemTables.cpp
#	tests/queries/0_stateless/02221_system_zookeeper_unrestricted.reference
#	tests/queries/0_stateless/02221_system_zookeeper_unrestricted_like.reference
#	tests/queries/0_stateless/03413_experimental_settings_cannot_be_enabled_by_default.sql
#	tests/queries/0_stateless/03745_system_background_schedule_pool.reference
#	tests/queries/0_stateless/03745_system_background_schedule_pool.sql
Cherry-pick of #1388
onto antalya-26.5. Conflicts resolved by keeping both antalya-26.5
additions and source PR additions:

- `ErrorCodes.cpp`: `STALE_VERSION` at 1005, `PENDING_MUTATIONS_NOT_ALLOWED` at 1006
- `ProfileEvents.cpp`: kept `UserThrottler*` and `ExportsThrottler*` events
- `setThreadName.h`: kept `BLOB_KILLER_TASK`, `BLOB_COPIER_TASK`, `EXPORT_PART`
- `ServerSettings.cpp`: added `enable_experimental_export_merge_tree_partition_feature`
- `Settings.cpp`: added export settings and antalya-26.5 SMT/join settings
- `SettingsEnums.{cpp,h}`: kept antalya-26.5 enums and added `MergeTreePartExportFileAlreadyExistsPolicy`
- `ClientInfo.h`: added `BackgroundOperationType` enum
- `ASTAlterQuery.cpp`: kept `execute_args` and added `to_table_function`/`partition_by_expr`
- `IPartitionStrategy.{cpp,h}`: kept `const` qualifier, dropped removed path methods, added `Block` overload
- `IMergeTreeDataPart.cpp`: kept `getMinMaxIndex`/`setMinMaxIndex`, added `MinMaxIndex::getBlock`
- `MergeTreeData.{cpp,h}`: resolved 5 conflicts — includes, settings externs, changeSettings, `writePartLog` signature
- `ReplicatedMergeTreeRestartingThread.cpp`: kept `deduplication_hashes_cache.start()`
- `StorageObjectStorage.cpp`: kept `startup`/`shutdown`/`scheduleDataProcessingJob`
- `StorageObjectStorageCluster.cpp`: kept `setConstraints`, added partition strategy block
- `StorageObjectStorageConfiguration.{cpp,h}`: kept `schema_hash` handling in `getPathForWrite`, kept all four `has*Wildcard` methods
- `StorageMergeTree.cpp`: kept both error code externs
- `StorageReplicatedMergeTree.h`: added export-related includes
- `StorageSystemMerges.cpp`: kept antalya-26.5 includes
- `attachSystemTables.cpp`: kept both `StorageSystemWasmModules.h` and `StorageSystemExports.h`
- Test reference files: kept both `deduplication_hashes` and `exports` entries
…next commit)

---
Original cherry-pick message follows:

Merge pull request #1402 from Altinity/26_1_export_improvements_test

Improvements to partition export
# Conflicts:
#	ci/jobs/scripts/integration_tests_configs.py
#	src/Core/Settings.cpp
#	tests/integration/test_export_replicated_mt_partition_to_object_storage/test.py
- `integration_tests_configs.py`: kept `antalya-26.5` iceberg entries (updated to `False` with new descriptions) and added the new `test_export_replicated_mt_partition_to_object_storage/` entry (bucket 1).
- `Settings.cpp`: inserted the two new settings (`export_merge_tree_partition_lock_inside_the_task`, `export_merge_tree_partition_system_table_prefer_remote_information`) after `export_merge_tree_part_throw_on_pending_patch_parts`, before the `antalya-26.5` additions (`shared_merge_tree_sequential_consistency_*`, `max_bytes_*`). The `iceberg_partition_timezone` context from "theirs" was not on `antalya-26.5` and was correctly excluded.
- `test.py`: took "theirs" — added `@pytest.mark.parametrize` decorator and `skip_if_remote_database_disk_enabled` call to `test_kill_export` (bucket 1).
add setting to define filename pattern for part exports
…eduled_after_scheduling

Bump scheduled exports count only in case it has been scheduled
…ing_the_lock

Export Partition - release the part lock when the query is cancelled
…next commit)

---
Original cherry-pick message follows:

Merge pull request #1618 from Altinity/export_partition_iceberg

Export partition to apache iceberg
# Conflicts:
#	src/Core/ServerSettings.cpp
#	src/Storages/MergeTree/MergeTreeData.cpp
#	src/Storages/ObjectStorage/DataLakes/IDataLakeMetadata.h
#	src/Storages/ObjectStorage/DataLakes/Iceberg/Constant.h
#	src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.h
#	src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.cpp
#	src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.h
#	src/Storages/ObjectStorage/DataLakes/Iceberg/MetadataGenerator.cpp
#	src/Storages/ObjectStorage/DataLakes/Iceberg/MultipleFileWriter.cpp
#	src/Storages/ObjectStorage/DataLakes/Iceberg/MultipleFileWriter.h
#	src/Storages/ObjectStorage/DataLakes/Iceberg/Utils.cpp
#	src/Storages/ObjectStorage/StorageObjectStorage.cpp
#	src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp
#	src/Storages/ObjectStorage/StorageObjectStorageCluster.h
#	tests/integration/test_export_replicated_mt_partition_to_object_storage/test.py
Resolve conflict markers left in the previous commit. Key adaptations
for the forward port to antalya-26.5:

- `StorageObjectStorageCluster`: drop methods that depend on `pure_storage`
  (prerequisite PR #1390 not present on antalya-26.5); adapt
  `MergeTreeData.cpp` to cast to `StorageObjectStorage` instead of
  `StorageObjectStorageCluster`
- Drop `object_storage_list_objects_*` settings from `ServerSettings.cpp`
  (prerequisite PR #1405 not present on antalya-26.5)
- `MultipleFileWriter`: adapt `startNewFile` and `finalize` to use
  `IcebergPathFromMetadata` + `IcebergPathResolver::resolve` (antalya-26.5
  API) instead of `FileNamesGenerator::Result` (source-branch API)
- `generateManifestFile` / `generateManifestList`: update callers in
  `Compaction.cpp`, `Mutations.cpp`, `IcebergMetadata.cpp` to the new
  signature (remove `data_file_row_counts`/`data_file_byte_counts`, use
  `std::vector<String>` for data file names, use `IcebergSerializedFileStats`)
- `commitImportPartitionTransactionImpl`: adapt all `FileNamesGenerator`
  calls to antalya-26.5 API (`generateMetadataPathWithInfo`,
  `generateManifestEntryName`, `IcebergPathFromMetadata::serialize`)
- `MetadataGenerator::generateNextMetadata`: add `is_truncate` parameter
  introduced by this PR
…next commit)

---
Original cherry-pick message follows:

Merge pull request #1713 from Altinity/export_partition_remove_lock_in_task

Remove lock inside the task export partition
# Conflicts:
#	src/Storages/MergeTree/ExportPartFromPartitionExportTask.cpp
@zvonand zvonand added releasy Created/managed by RelEasy antalya-26.5 ai-resolved Port conflict auto-resolved by Claude auto-prereq-added Combined PR includes auto-added prerequisite PR(s) labels Jun 25, 2026
@github-actions

Copy link
Copy Markdown

Workflow [PR], commit [1d54714]

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.5 auto-prereq-added Combined PR includes auto-added prerequisite PR(s) releasy Created/managed by RelEasy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant