shangeyao opened a new pull request, #16757:
URL: https://github.com/apache/iceberg/pull/16757
### Summary
Fixes #16744.
When commit retry is exhausted, the failure message currently rethrows the
underlying `CommitFailedException` without indicating why the retry loop
stopped. This makes it hard for operators to know which table property to tune
(`commit.retry.num-retries` vs `commit.retry.total-timeout-ms`).
This change:
- Adds `RetryExhaustedException` with a `Reason` enum
(`RETRY_LIMIT_EXCEEDED` / `TIMEOUT_EXCEEDED`) in `Tasks.java`
- Throws `RetryExhaustedException` (preserving the original exception as
cause) when retry is exhausted
- Catches `RetryExhaustedException` at all 14 commit call sites and
translates the reason into actionable messages, e.g.:
- `"Commit failed and retry timeout (60000 ms) reached. Consider
increasing 'commit.retry.total-timeout-ms'"`
- `"Commit failed and retry limit (4) reached. Consider increasing
'commit.retry.num-retries'"`
The design keeps the generic retry utility (`Tasks`) unaware of Iceberg
property names — classification happens in `Tasks`, translation happens at
commit call sites.
### Testing
```bash
./gradlew :iceberg-core:test --tests "org.apache.iceberg.util.TestTasks"
./gradlew :iceberg-core:compileJava
```
--
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]