Description
The RetryOrchestrator uses this method for Query, Views, Analytics, and Search requests:
public async Task<T> RetryAsync<T>(Func<Task<T>> send, IRequest request) where T : IServiceResult
If the FailFast Retry Strategy is used for this method, it may result in an infinite processing loop due to how the code currently handles things:
do {
... processing ...
var action = strategy.RetryAfter(request, reason);
if (action.Retry)
} while (true);
//else statement is not present ==> FailFast has action.Retry=false, which causes the processing to remain in the do while(true) loop
If an exception is always generated in the ... processing ..., then there will not be an issue. However, if exceptions are not thrown and the RetryReason on the result is used to capture errors, then this issue may occur.
Workaround is to not use the FailFast Retry Strategy for these types of requests.
Attachments
For Gerrit Dashboard: NCBC-3197 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
174537,13 | NCBC-3197: FailFast retry strategy may result in infinite loop for HTTP services | master | couchbase-net-client | Status: MERGED | +2 | +1 |