Repository navigation
Remove Iceberg orphan files on failure - #127275
Conversation
|
Workflow [PR], commit [fdba827] Summary: ✅
AI ReviewSummaryThe PR removes uncommitted Iceberg data files and manifests when Missing context / blind spots
Final VerdictStatus: ✅ Approve. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units16 translation units recompiled, 136 s compile time in total, 16 of them have a recent master baseline. |
Master's ClickHouse#127275 made `~IcebergStorageSink` remove the written data files and manifests whenever the insert did not commit. When the catalog commit fails with an unknown outcome, `initializeMetadata` already skips its own cleanup, but the exception leaves `committed` false, so the destructor then deleted the files of a snapshot that may be the table's current one. Measured on the merged tree: the Glue arms `test_glue_commit_unknown_keeps_files` and `test_glue_commit_read_back_raising_keeps_files` failed with `S3_ERROR ... key does not exist ... metadata/<uuid>.avro`. The REST arms stayed green only because they asserted `count()`, which Iceberg answers from the snapshot summary without opening the manifests or data files. They now count through `WHERE NOT ignore(*)`, and on the unfixed binary the four INSERT unknown-outcome arms fail with the same missing-manifest error; DELETE, OPTIMIZE and DROP PARTITION have no such destructor and stayed green. The unknown branch now sets `committed`, whose meaning becomes "is, or may be, committed". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Master's ClickHouse#127275 made `~IcebergStorageSink` remove the written data files and manifests whenever the insert did not commit. An `UNKNOWN_STATUS_OF_TRANSACTION` from `initializeMetadata` leaves `committed` false, so the destructor deleted the files of a snapshot the table may already point at, after the commit path had deliberately kept them. 04929's unknown-outcome INSERT case caught it after the master merge: a data file and a manifest gone, `SELECT sum(c0)` failing FILE_DOESNT_EXIST on the manifest. Record the unknown outcome and skip the destructor's cleanup for it. Inserts that fail any other way still remove their files (05441 passes). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Remove Iceberg orphan files on failure
Workflow [PR]
Sync PR [sync-upstream/pr/127275]
Version info
26.11.1.785-master(included in26.11and later)