nevzheng opened a new issue, #14392: URL: https://github.com/apache/gravitino/issues/14392
### What would you like to be improved? **Priority: P3** (scale in the parent epic; impact if hit, not scheduling) Every error in a cleanup job is handled the same way: count an attempt and retry **at once**. After [recordFailure](https://github.com/apache/gravitino/blob/bb634defdc5663a8124be5fca1c8d9e52ac096ac/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/cleanup/mapper/provider/base/IcebergCleanupJobBaseSQLProvider.java#L122-L147) the row is `PENDING` again, and the [worker loop](https://github.com/apache/gravitino/blob/bb634defdc5663a8124be5fca1c8d9e52ac096ac/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/cleanup/IcebergCleanupManager.java#L255-L278) only sleeps when no job is waiting. The doc of `async-cleanup.poll-interval-secs` says it is "also the retry interval", but retries do not wait. Since a `FAILED` job stops reserving its name (#14388), every spurious `FAILED` becomes a leak. Observed symptoms (each reproduced by a test in the parent epic): | Symptom | Effect | | ------- | ------ | | A transient storage error (for example S3 `503 Slow Down`): all 5 default attempts ran within 26 ms during a 2 s outage. | `FAILED` after a short outage. | | A graceful shutdown interrupts the bulk delete, and `runJob` [counts it as a failure](https://github.com/apache/gravitino/blob/bb634defdc5663a8124be5fca1c8d9e52ac096ac/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/cleanup/IcebergCleanupManager.java#L280-L295). | A long purge that spans `max-attempts` rolling restarts ends `FAILED`. | | A permanent error (`403 Access Denied`) is retried the same way: 5 attempts in 28 ms. A deterministic bug (the delete-manifest failure in the "match `dropTableData`" issue) also burns all its attempts. | Permanent and transient errors are not told apart, so neither is handled well. | ### How should we improve? Sort failures into three kinds: - **Transient:** retry with backoff. - **Shutdown:** release the claim without counting an attempt. - **Permanent:** stop with a clear reason, and alert. Filed for discussion and prioritization; no fix is scheduled as part of this report. Parent: the async purge audit epic. -- 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]
