Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-3197

FailFast Retry Strategy May Result in Infinite Processing Loop for Query, Views, Analytics, Search requests

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.3.2
    • 3.3.1
    • library
    • None
    • 1
    • SDK20: Pathfinding + Wrappers

    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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jmorris Jeff Morris
            obawin obawin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty