wombatu-kun commented on code in PR #16780:
URL: https://github.com/apache/iceberg/pull/16780#discussion_r3478866776
##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -494,6 +495,7 @@ public void commit() {
base.propertyAsInt(COMMIT_TOTAL_RETRY_TIME_MS,
COMMIT_TOTAL_RETRY_TIME_MS_DEFAULT),
2.0 /* exponential */)
.onlyRetryOn(CommitFailedException.class)
+ .onRetryExhausted(CommitRetry::retryExhaustedException)
Review Comment:
`onRetryExhausted` is wired into the direct commit paths but not into
`BaseTransaction`'s two retry loops (`commitReplaceTransaction` at
BaseTransaction.java:312, `commitSimpleTransaction` at :367) - the remaining
`onlyRetryOn(CommitFailedException.class)` sites. Transaction commits exhaust
retries only there (the per-operation `SnapshotProducer` loop inside a
transaction runs against `TransactionTableOperations`, which only stages
metadata in memory), so `table.newAppend().commit()` gets the new guidance
directly while the same append inside a transaction still throws the bare
message; `TestTransaction.java:251`/`:285` still assert that old message.
Adding `.onRetryExhausted(CommitRetry::retryExhaustedException)` to both loops
closes it.
--
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]