[SERVER-52676] Hedged reads should ignore stale errors Created: 06/Nov/20  Updated: 29/Oct/23  Resolved: 16/Dec/20

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 4.4.1
Fix Version/s: 4.9.0, 4.4.17

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Jaume Moragues (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Steps To Reproduce:
  • An insert occurs and it's majority written, but haven't been replicated on one of the nodes
  • A count operation is performed
  • The fastest request is the one to the node that haven't replicate the insert yet
  • A StaleDB or StaleShardVersion error is thrown
Participants:
Linked BF Score: 45

 Description   

Imagine the following scenario with a sharded cluster with 1 router, and 1 shard with 3 nodes and hedged reads active:

  • An insert occurs and it's majority written, but haven't been replicated on one of the nodes
  • A count operation is performed
  • The fastest request is the one to the node that haven't replicate the insert yet
  • A StaleDB or StaleShardVersion error is thrown

The current code only ignores MaxTimeMSExpired errors so a stale error will make the operation fail.



 Comments   
Comment by Githook User [ 08/Sep/22 ]

Author:

{'name': 'Jaume Moragues', 'email': 'jaume.moragues@mongodb.com'}

Message: SERVER-52676 Hedged reads should ignore stale errors

(cherry picked from commit a62abb0614bbcff329a89ba76fe42d2d3d4e2d3c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/4218c040fd9bf7873b765ea5d3113f718c44e9eb

Comment by Githook User [ 16/Dec/20 ]

Author:

{'name': 'Jaume Moragues', 'email': 'jaume.moragues@mongodb.com'}

Message: SERVER-52676 Hedged reads should ignore stale errors
Branch: master
https://github.com/mongodb/mongo/commit/a62abb0614bbcff329a89ba76fe42d2d3d4e2d3c

Generated at Thu Feb 08 05:28:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.