Details
-
Task
-
Resolution: Fixed
-
Major
-
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
- relates to
-
NCBC-3485 LookupInAnyReplica might fail when they should be successful
- Closed