Replication failure scenario

Hello,

I’m planning to use FailFastStrategy and getAnyReplica afterwards to handle data retrieval failure but I have a concern about this scenario;

  1. User update data
  2. SDK upsert data using “Majority” durability options to a bucket with 2 replica
  3. Replication to replica 1 is succeeded
  4. SDK receives success response
  5. Replication to replica 2 is failed/delayed
  6. User retrieve data
  7. Request to active node is failed and immediately return failed response due to FailFastStrategy
  8. SDK try to get from replica using “getAnyReplica”
  9. It tries to get data from replica 2 which not yet updated
  10. SDK receives outdated data

Is above scenario is possible…?
If yes, is there any way to guarantee we can get data from updated replica…?

Thank you.

Use get() instead of getAnyReplica(). getAnyReplica() is specifically to accept the risk of not getting the latest document.

@mreiche thank you for your answer, actually I will just call getAnyReplica() to get quick alternative when active node is failing.
So not getting the latest one would be the risk I can’t avoid, correct ?