[SERVER-47972] maxTimeMS set on hedged requests does not give shards enough time to refresh Created: 05/May/20  Updated: 29/Oct/23  Resolved: 15/May/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc7, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Haley Connelly Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-13650 Investigate changes in SERVER-47972: ... Closed
Related
related to SERVER-48264 ShardServerCatalogCacheLoader doesn't... Closed
is related to SERVER-46187 MongoS doesn't pass maxTimeMS to shar... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Service arch 2020-05-18
Participants:
Linked BF Score: 28

 Description   

Goal: investigate if the scenario outlined below is possible and determine a fix. 

 

Scenario:

Suppose shard0 has a primary, secondary0, and secondary1.

  • Each time mongos tries to perform 'count' with hedged reads, secondary0 never gets the chance to set the in memory database version because it either gets killedOp'd or timed out of maxTimeMS before it can be set successfully after refreshing.
  • Over the NetworkInterfaceTL, mongos tries to route the next 'count' command to secondary0. Secondary0 has no known databaseVersion, so onDbVersionMismatchNoExcept gets called. A refresh is prompted and errors with maxTimeMS expiration error.
  • Since the maxTimeMS error is ignored, the original "no known dbVersion" error propagates back to the NetworkInterfaceTL. There, since the error reported is not maxTimeMS, the finish line is triggered. Secondary0 wins the race, but the 'count' fails with "don't know dbVersion."

In this scenario, we believe secondary0 would be getting killed here.



 Comments   
Comment by Githook User [ 15/May/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-47972 Increase maxTimeMSForHedgedReads to give shards time to refresh

(cherry picked from commit e9666e1a6f1494e181c0f064db92734d01206430)
Branch: v4.4
https://github.com/mongodb/mongo/commit/acde566e9fb14bc0dd16e8a676415f63335d7f47

Comment by Githook User [ 15/May/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-47972 Increase maxTimeMSForHedgedReads to give shards time to refresh
Branch: master
https://github.com/mongodb/mongo/commit/e9666e1a6f1494e181c0f064db92734d01206430

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