Add integration tests for attach/detach and restart of Iceberg tables#91583
Conversation
Resolve conflict in `registerStorageObjectStorage.cpp`: combine the PR's ATTACH mode check with master's added `std::nullopt` credential callback argument. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update comment in `registerStorageObjectStorage` to explain that both CREATE and ATTACH need non-readonly object storage, while server restart (FORCE_ATTACH) should remain readonly. - Fix wrong table name prefix in `test_writes_detach_attach` (was `test_writes_complex_types_`). - Add `test_writes_restart` that does a real server restart via `restart_clickhouse` and verifies inserts work after restart. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Dear @alexey-milovidov, @divanik, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
Picked this up to advance it. Summary of what I did and an important finding for you to decide on. Done
Key finding: the source change is now redundantThe actual fix for #85413 already landed on Because of that, this PR's change to the shared
This also explains the The genuinely valuable part of this PR is the added integration coverage ( Suggestion: consider reducing this to a test-only PR (drop the Unrelated CI failures (not caused by this PR)
|
|
@alexey-milovidov investigated. The obfuscator amd_tsan failures ( CIDB evidence:
Tracking this in our chronic-flaky umbrella tasks for |
…hange The local-Iceberg writability fix for ClickHouse#85413 already landed on master in 7ee8dd3 ("Keep IcebergLocal writable after DETACH/ATTACH or server restart"), at the configuration layer: StorageLocalConfiguration::createObjectStorage now ignores is_readonly and always builds a writable LocalObjectStorage (StorageS3Configuration and HDFS already ignore the flag). After that, the change here to pass is_readonly=false on explicit ATTACH through the shared helper was redundant for the stated local-Iceberg goal, and the only remaining consumer of the flag, StorageAzureConfiguration, would take a behavioral change (an extra existence check / container-create path in AzureBlobStorage::getContainerClient) on DETACH/ATTACH of an existing Azure-backed table, with no benefit. Reverting registerStorageObjectStorage.cpp to match master and keeping only the additional integration coverage (test_writes_detach_attach, test_writes_restart). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Picked this up via
The previously-red CI ( |
|
@groeneai, investigate the failure: This is unrelated to this PR (which is test-only, adding two Iceberg integration tests). The test is failing on |
|
@alexey-milovidov, fix in flight: #106717. Stop-gap pin of Mechanism: under The proper fix - making materialized CTEs work under parallel replicas - lives in Session id: cron:clickhouse-ci-task-worker:20260608-120900 |
|
@alexey-milovidov — closing the loop on this directive. The flaky Stop-gap fix PR #106717 (pinned If/when materialized CTEs are reintroduced, the proper parallel-replicas support (initiator-side Session: cron:clickhouse-ci-task-worker:20260609-071900 |
|
Merged The sole CI failure was No conflicts; the PR diff is unchanged (the two new |
LLVM Coverage ReportChanged lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 879 line(s), 54 function(s) across 132 file(s) · Details Top files
|

Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Test-only. Adds integration coverage (
test_writes_detach_attach,test_writes_restart) verifying that Iceberg tables stay writable afterDETACH/ATTACHand after a server restart, acrosss3,azure, andlocal.The actual fix for the local-Iceberg writability issue already landed on master in 7ee8dd3 ("Keep IcebergLocal writable after DETACH/ATTACH or server restart"), at the configuration layer (
StorageLocalConfiguration::createObjectStorageignoresis_readonly). The originalregisterStorageObjectStorage.cppchange in this PR became redundant for that goal and would have introduced an unrelated behavioral change forAzureBlobStorageon explicitATTACH, so it was reverted; only the additional tests remain.Related: #85413
Related: 7ee8dd3 (the fix that closed #85413 on master)
Documentation entry for user-facing changes
Version info
26.6.1.767