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

GetInAnyReplica might fail when it should be successful + throw DocumentUnretrievable

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 3.4.12
    • None
    • None
    • None
    • 3
    • SDK38

    Description

      Motivation
      -----------
      GetInAnyReplica executes the lookup by making a list of Tasks on replica nodes + primary, then executing Task.WhenAny() on that list.
      However Task.WhenAny() returns a Task that completes when any of the given tasks completes, whether successfully or faulted/canceled. So if the first lookup that completes fails and throws, that one will be returned when another one might have been successful.

      GetAnyReplica should also throw DocumentUnretrievable and wrap inner exceptions if all gets failed.

      Desired State
      --------------
      Execute all Tasks and get the successful one if there is any, or throw DocumentUnretrievable if all failed.

      Attachments

        Issue Links

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

          Activity

            People

              emilien.bevierre Emilien Bevierre
              emilien.bevierre Emilien Bevierre
              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