You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// there are no available upstream at the moment
// fallback: we want to make one more try for an upstream with the min retry time
// the flag `used` is needed to mark an upstream not to use in the next fallback iteration
// it's reset when upstream returns succeeded code 200(OK)
var candidate = upstreams
.filter(upstream -> isHttpCode5xx(upstream.statusCode) && upstream.retryAfterSource == CORE && !upstream.used)
.min(upstream -> upstream.retryAfter)
if (candidate != null) {
candidate.used = true
return candidate
}
candidate = upstreams
.filter(upstream -> isHttpCode5xx(upstream.statusCode) && upstream.retryAfterSource == UPSTREAM && !upstream.used)
.min(upstream -> upstream.retryAfter)
if (candidate != null) {
candidate.used = true
return candidate
}
candidate = upstreams
.filter(upstream -> upstream.statusCode == 429 && upstream.retryAfterSource == CORE && !upstream.used)
.min(upstream -> upstream.retryAfter)
if (candidate != null) {
candidate.used = true
return candidate
}
candidate = upstreams
.filter(upstream -> upstream.statusCode == 429 && upstream.retryAfterSource == UPSTREAM && !upstream.used)
.min(upstream -> upstream.retryAfter)
candidate.used = true
return candidate
The text was updated successfully, but these errors were encountered:
Note. The field
used
has http request scope.The text was updated successfully, but these errors were encountered: