[SERVER-47799] AsyncRequestsSender should update replica set monitor in between retries for InterruptedAtShutdown Created: 27/Apr/20  Updated: 29/Oct/23  Resolved: 21/May/20

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: None
Fix Version/s: 4.0.20, 4.2.8, 4.4.0-rc8, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Janna Golden
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2, v4.0
Sprint: Sharding 2020-05-18, Sharding 2020-06-01
Participants:
Case:

 Description   

When the AsyncRequestSender handles an error response, it will try to update the replica set monitor for the shard and retry up to 3 times, using the Shard object's targeter to resolve the new host and port to send the request to. However, it turns out that updateReplSetMonitor doesn't actually do anything for the particular error code InterruptedAtShutdown, which is an Interruption error, a Shutdown error, and a Retriable error, but not a NotMaster error or Network error (which is what updateReplSetMonitor is looking for). So this means that the InterruptedAtShutdown error will get propagated to the client except when:

  • The original host starts up again before all three retries have been exhausted
  • The router receives some other error in parallel that causes its ReplicaSetMonitor to refresh for that shard and find a new primary

We should change updateReplSetMonitor to include Shutdown errors in the list of errors that will cause the host to be marked as failed (or otherwise include InterruptedAtShutdown).

As a side note, I think the current behavior violates the retryable reads spec but it's hard to tell exactly.



 Comments   
Comment by Githook User [ 14/Jul/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-47799 AsyncRequestsSender should update replica set monitor in between retries for shutdown errors

(cherry picked from commit fbf56a4aee8ccb7bff8d3e8c3c32c7849869bb54)
(cherry picked from commit 1fe87e24b61de66d4ba3f61912c9c00883646758)
Branch: v4.0
https://github.com/mongodb/mongo/commit/7f699ffd1710c027d3bade0257a7cd2821e9db28

Comment by Githook User [ 02/Jun/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-47799 AsyncRequestsSender should update replica set monitor in between retries for shutdown errors

(cherry picked from commit fbf56a4aee8ccb7bff8d3e8c3c32c7849869bb54)
Branch: v4.2
https://github.com/mongodb/mongo/commit/1fe87e24b61de66d4ba3f61912c9c00883646758

Comment by Githook User [ 02/Jun/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-47799 AsyncRequestsSender should update replica set monitor in between retries for shutdown errors

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

Comment by Githook User [ 20/May/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-47799 AsyncRequestsSender should update replica set monitor in between retries for shutdown errors
Branch: master
https://github.com/mongodb/mongo/commit/fbf56a4aee8ccb7bff8d3e8c3c32c7849869bb54

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