Repository navigation
Conversation
…update of `OPTIMIZE TABLE ... MANIFEST` fails or reports failure; verify the commit in REST catalogs, fail without retry for Glue/storage. Add failpoints `iceberg_catalog_update_metadata_fail`, `iceberg_catalog_update_metadata_reported_as_failed`, `iceberg_glue_update_table_fail` and integration tests for these cases (#2416).
54c0f2d to
902c56c
Compare
…FEST, as other Iceberg writes do
CI triage for f7c04f7Summary: 11 failing checks. None of the test failures come from this PR's code. The only item you need to act on is DCO, which is a process check.
1. DCO: PR-sideNeither commit ( 2. Integration tests:
|
|
Audit update for PR #2881 (Iceberg manifest compaction commit safety): Confirmed defects: No confirmed defects in reviewed scope. Coverage summary: Scope reviewed: writeConsolidatedManifestFile commit/cleanup state machine (all 5 exit paths: storage CAS conflict, non-transactional catalog reject, non-transactional catalog throw, transactional catalog reject/unknown with verify, post-publish exception), isSnapshotInCatalogMetadata verify logic, compactIcebergManifests retry loop with catalog-based metadata resolution, REST/Glue/storage-only catalog contracts, 3 new failpoints, 3 new integration tests (REST) + 1 new (Glue). |
|
Shouldn't we ship this to upstream as well? |
|
This is an interesting PR and problem. I think we should FIRST ship some form of it to upstream. Not only because we'll fix the issue there as well, but because we'll gather opinions. This PR only addresses these issues in the compaction path, but afaik, this is also present in the regular insert path. I think it should be consistent. The Rest fix is reasonable (I think upstream actually wants it, see this [comment](https://github.com/ClickHouse/ClickHouse/blob/82024f19538c2ff2b04a1fe320a090ca777d6d56/src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.cpp#L1868 and this comment)), but Glue writing logic seems to be very different than ours already. Not only that, but I am not entirely sure this is the right approach. If I understand the code correctly, they are doing a similar thing for Glue.. It is worth taking a look before proceding |
PR #2881 Audit Review
VerdictTwo Medium defects. The PR fixes both scenarios in the issue as written. Files are no longer deleted once storage names the new snapshot, and they are no longer deleted when the REST catalog applied the commit but answered with an error. The REST fix decides whether the commit landed with a single immediate read of the catalog. A timed-out request can still be in flight on the catalog side when that read happens. In that case cleanup deletes manifests that become live a moment later. The switch to reading the current metadata from the catalog also removes Glue's self-healing. After the new "catalog rejected the update" error, every later Confirmed defectsPartial / gray failureMedium: "commit state unknown" is resolved by one immediate read, so a still-in-flight commit can lose its manifests
Configuration / recovery (non-transactional catalog)Medium: after Glue rejects the pointer update, later
Lower-severity notes
What was checked and found clean
Coverage
Assumptions and limits. Static reading of Operational readinessScope.
|
…pshot-antalya-26.8
…ide if commit has landed
… of https://github.com/Altinity/ClickHouse into 2416-optimize-manifest-published-snapshot-antalya-26.8
@arthurpassos made changes to be consistent with upstream |
PR #2881 Audit Review (rerun 2026-11-24)
History read
VerdictNo Medium or High defects remain. Both previous Mediums are fixed by the new protocol. One Low remains: with no backoff, every rejected attempt, including a definite conflict, leaves a full set of manifests behind. The fix drops the catalog read-back. It sets How the previous findings were closedMedium 1, in-flight REST commit. Closed by construction. Medium 2, Glue livelock. Closed. Confirmed defectsBackpressure & resource limitsLow: every rejected attempt leaves its manifests behind, and the retry loop has no backoff
What was checked and found clean
Coverage
Assumptions and limits. Static reading of CI on the headAt the time of review, CI on Operational readinessScope.
|
PR #2881 CI Verification
VerdictCI does not block approval. No failure is Six checks are red. None of them is reachable from the diff, and each fails the same way on the
One gap: How the list was reducedThe regression table has 13 non-OK rows for this run, plus 2 failed checks without rows (
Findings
|
| Scenario | antalya-26.8 branch |
Other 26.8 PRs | This PR |
|---|---|---|---|
cpu overload |
29 of 29 | fails on nearly every PR (one exception: 2912, 0 of 5) | 4 of 4 |
cpu overload all swarm nodes |
29 of 29 | 309 of 314 (including this PR) | — |
The PR's catalog changes only add fail points to the metadata-update path. Its other changes are in manifest compaction and bin-pack rewrite. A distributed read does not reach either.
RegressionTestsRelease / Common (settings) — pre-existing-flaky
Job 138488281661. Five leaves under /settings/default values/ fail with AssertionError:
ai_function_max_concurrent_requests_per_thread, ai_function_max_retries, allow_experimental_iceberg_add_files, json_extract_use_cast_string_to_date_time_mode, output_format_arrow_max_record_batch_size_bytes
The 26.8 Antalya default-values snapshot on release is behind the server. Four of the settings are missing from it, and ai_function_max_retries has a different default. The same five settings fail on the antalya-26.8 branch and on PR 2941 with regression commit 726ecf152. The PR does not add or change any setting. The fix is a snapshot update in clickhouse-regression.
This is a deterministic snapshot mismatch rather than a flake. It is listed as pre-existing-flaky because the failure exists unchanged on the base branch.
RegressionTestsRelease / Alter (attach, 1) — infrastructure
Job 138488277430. Every scenario passed (JOB_OUTCOME: success, no non-OK rows for this run). The check went red in the post-step .github/set_builds_status.py, which could not reach the status endpoint:
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Build (arm_release) — infrastructure
Job 138455169352. The compile ran. The job failed while restoring the ThinLTO cache from S3:
ERROR: Failed to download S3 object [altinity-builds-cache/ci_ch_cache/thinlto/antalya-26.8/arm_release-g0.tar.zst]:
Max Retries Exceeded: 8331264 read, but total bytes expected is 8388608.
The transfer was cut off short of the expected size. Jobs that depend on this build were skipped.
Recommendation
CI is not a reason to withhold verified. Before merging:
- rerun
Build (arm_release)so the ARM release jobs run on this head; - rerun
Iceberg (1)andIceberg (2)onceclickhouse-regressionreleasehasd4f091073. Until then, the Iceberg regression suite has not run against this change.
closes: #2416
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix bug in Iceberg manifest compaction: when ClickHouse compacts manifests and the catalog update fails or the client sees a “commit state unknown” response, it could incorrectly delete manifest files that were already made visible in storage or by the catalog.
CI/CD Options
Exclude tests:
Regression jobs to run: