akritishakya opened a new pull request, #2463: URL: https://github.com/apache/iceberg-go/pull/2463
Closes #2406 ## Problem `ErrDataFilesMissing` wrapped `ErrCommitFailed`, so callers that check for `ErrCommitFailed` treated it as a retryable conflict. It is not retryable: the delete references data files that are not live, and a new transaction that stages the same delete files fails again with the same error. Iceberg Java raises `ValidationException` here, which its commit retry logic does not retry. ## Changes - `ErrDataFilesMissing` no longer wraps `ErrCommitFailed`, matching `ErrCommitDiverged`. - `doCommit` wraps it in `ErrTransactionUnusable` when a validator returns it, so the transaction cannot be committed again. - Updated the related documentation, including `conflictValidatorFunc`, and declared `ErrConflictingDataFiles` and `ErrConflictingDeleteFiles` individually. ## Breaking change Errors caused by missing referenced data files no longer match `table.ErrCommitFailed`. Callers should match `table.ErrDataFilesMissing` and rebuild the delete against the current table. ## Testing - Added `TestTerminalErrors_DoNotWrapCommitFailed` for `ErrCommitDiverged` and `ErrDataFilesMissing`. - Updated existing tests to assert that the error does not match `ErrCommitFailed` and, where `Transaction.Commit` fails, that it matches `ErrTransactionUnusable`. -- 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]
