smaheshwar-pltr opened a new pull request, #4520: URL: https://github.com/apache/iceberg-python/pull/4520
# Rationale for this change When the catalog reports a commit as failed, the transaction checks whether it landed anyway, for example if only the response was lost, before deleting the files it wrote. It counts the commit as landed only if every snapshot it added is in the refreshed table. A transaction with two appends adds two snapshots, and once it commits, no branch or tag points at the first, so another writer can expire it. If that happens before the check, the transaction deletes the files of the commit that landed, including the current snapshot's manifest list, and the table can no longer be read. With retries left, it commits again and fails instead, and an overwrite also deletes the files. Commits are atomic and snapshot IDs are unique, so finding any one of the added snapshots shows the commit landed. This checks for any of them instead of all. ## Are these changes tested? Yes. A catalog test simulates a lost response while another writer expires either the transaction's first snapshot, or its last one after committing on top, with and without retries. It fails without the fix. ## Are there any user-facing changes? No API changes. **AI Disclosure:** This PR was authored by Claude Code (Opus 5.5) but directed and overseen by me. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
