pingtimeout commented on PR #1517: URL: https://github.com/apache/polaris/pull/1517#issuecomment-2854923371
@singhpk234 I think the code should be implemented using SmallRye `@Retry` annotation instead of a custom logic. This is a very common feature and I don't think we should reimplement it. You could benefit from the randomized delay strategy or even an exponential backoff (which could be better). That being said, it would require some logic around the driver `execute(...)` method. Something like: * Create a new exception class called `RetryableSQLException` * if the query results in a `SQLException`, and the error code is considered retryable, wrap it in `RetryableSQLException` * otherwise, re-throw the original exception * Use the `@Retry` annotation with the `retryOn` attribute set to `RetryableSQLException` Benefits from doing so include less code to maintain, but also metrics on the amount of retries. Note that I am only `-0.9` here. If you feel strongly against using `@Retry`, feel free to ignore. -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org