diff options
Diffstat (limited to 'jaxrs_client_utils/src/main')
-rw-r--r-- | jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/JaxRsTimeouts.java | 4 | ||||
-rw-r--r-- | jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/RetryingJaxRsStrategy.java | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/JaxRsTimeouts.java b/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/JaxRsTimeouts.java index 6758d6f94d6..914a9d7b42c 100644 --- a/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/JaxRsTimeouts.java +++ b/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/JaxRsTimeouts.java @@ -7,14 +7,14 @@ import java.time.Duration; */ public interface JaxRsTimeouts { /** - * The connect timeout, which must be at least 1ms. + * The connect timeout, which must be at least 1ms. Called once per real REST call. * * Throws com.google.common.util.concurrent.UncheckedTimeoutException on timeout. */ Duration getConnectTimeoutOrThrow(); /** - * The read timeout, which must be at least 1ms. + * The read timeout, which must be at least 1ms. Called once per real REST call. * * Throws com.google.common.util.concurrent.UncheckedTimeoutException on timeout. */ diff --git a/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/RetryingJaxRsStrategy.java b/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/RetryingJaxRsStrategy.java index 4c97147d61e..a431c41c5cf 100644 --- a/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/RetryingJaxRsStrategy.java +++ b/jaxrs_client_utils/src/main/java/com/yahoo/vespa/jaxrs/client/RetryingJaxRsStrategy.java @@ -4,6 +4,7 @@ package com.yahoo.vespa.jaxrs.client; import com.yahoo.vespa.applicationmodel.HostName; import javax.ws.rs.ProcessingException; +import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.UriBuilder; import java.io.IOException; import java.net.URI; @@ -85,6 +86,7 @@ public class RetryingJaxRsStrategy<T> implements JaxRsStrategy<T> { try { return function.apply(jaxRsClient); } catch (ProcessingException e) { + // E.g. java.net.SocketTimeoutException thrown on read timeout is wrapped as a ProcessingException sampleException = e; logger.log(Level.INFO, "Failed REST API call to " + hostName + ":" + port + pathPrefix + " (in retry loop): " |