jsedding commented on code in PR #2663:
URL: https://github.com/apache/jackrabbit-oak/pull/2663#discussion_r2626020067
##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java:
##########
@@ -211,6 +213,26 @@ private boolean isInError() {
return inError;
}
+ /**
+ * Checks if the exception is a transient client-side exception that
should be retried.
+ * This includes timeouts and IO/network errors that can occur when
communicating with Azure.
+ * <p>
+ * Per Azure SDK documentation, the timeout parameter causes a
RuntimeException to be raised.
+ * @param e the exception to check
+ * @return true if this is a transient exception that should be retried
+ */
+ private boolean isTransientClientSideException(Exception e) {
+ Throwable current = e;
+ while (current != null) {
+ if (current instanceof java.util.concurrent.TimeoutException ||
+ current instanceof java.io.IOException) {
+ return true;
+ }
+ current = current.getCause();
+ }
+ return false;
+ }
Review Comment:
@smiroslav looking at the [code referenced by the
stacktrace](https://github.com/reactor/reactor-core/blob/60e3e4d8e5f10992d8d7acee75a5caa58eda1e68/reactor-core/src/main/java/reactor/core/publisher/BlockingSingleSubscriber.java#L128)
you shared in OAK-12039, I don't think this check will work.
As far as I can see, an `IllegalStateException` without any causes is
constructed if a timeout occurs.
The case where an `IOException` is expected as the cause _may_ work. I
cannot tell immediately from the code. A few more stack traces/thread dumps may
be helpful to get a better understanding of the failing code-paths.
--
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]