You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cleanup deletes a landed commit's manifests when another writer expires all of its snapshots #4534
When a catalog reports CommitFailedException for a commit that landed, Transaction.commit_transaction calls _attempt_landed(), which looks for the attempt's snapshot IDs in the refreshed table. #4520 makes it accept any one of them. Suppose another writer commits on top and then expires all of the attempt's snapshots before the check. Then none are found, and the transaction either deletes its manifests (no retries left) or commits the data again (retries left). The other writer's snapshot still lists those manifests, so scans fail with FileNotFoundError.
Reproduction with the _commit_outcomes(..., after_lost=...) helper from #4520 in tests/table/test_commit_retry.py, on a new table:
commit.retry.num-retries=0: append() raises CommitFailedException, and the next scan fails with FileNotFoundError.
commit.retry.num-retries=1: append() returns, and the next scan fails with FileNotFoundError.
Possible direction
Before deleting a manifest, check whether any snapshot in the refreshed metadata still references it, and keep it if so. The review on #4520 suggests a narrower version that checks branch heads for the attempt's written manifests. Detecting the landed commit through its manifests would also stop the duplicate commit on retry. For Glue, #4533 fixes the cause in the catalog itself. A REST client can't do the same, because the server writes the metadata file and the client never learns its location.
Activity