diff options
author | jonmv <venstad@gmail.com> | 2023-08-23 09:08:23 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-08-23 09:08:23 +0200 |
commit | 024d35283f91b1bc22e67eeb3be1c9cb334eb320 (patch) | |
tree | 3d7f112d0637850d0301b026828413921b5b7fb3 /vespa-feed-client | |
parent | 30758a13a310f5088dcf3bdfcd7e5688872afa7b (diff) |
503 from /doc/v1 is not backpressure, but hopefully transient
Diffstat (limited to 'vespa-feed-client')
-rw-r--r-- | vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java index ce86ad59ffe..ebbff9ed84b 100644 --- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java @@ -149,7 +149,7 @@ class HttpRequestStrategy implements RequestStrategy { return false; } - /** Retries throttled requests (429, 503), adjusting the target inflight count, and server errors (500, 502). */ + /** Retries throttled requests (429), adjusting the target inflight count, and server errors (500, 502, 503, 504). */ private boolean retry(HttpRequest request, HttpResponse response, int attempt) { if (response.code() / 100 == 2 || response.code() == 404 || response.code() == 412) { logResponse(FINEST, response, request, attempt); @@ -159,14 +159,14 @@ class HttpRequestStrategy implements RequestStrategy { } - if (response.code() == 429 || response.code() == 503) { // Throttling; reduce target inflight. + if (response.code() == 429) { // Throttling; reduce target inflight. logResponse(FINER, response, request, attempt); throttler.throttled((inflight.get() - delayedCount.get())); return true; } logResponse(FINE, response, request, attempt); - if (response.code() == 500 || response.code() == 502 || response.code() == 504) { // Hopefully temporary errors. + if (response.code() == 500 || response.code() == 502 || response.code() == 503 || response.code() == 504) { // Hopefully temporary errors. breaker.failure(response); return retry(request, attempt); } |