[SERVER-71192] async_rpc::sendHedgedCommand should rewrite targeter and executor shutdown errors Created: 08/Nov/22  Updated: 29/Oct/23  Resolved: 15/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: George Wangensteen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2022-11-14, Service Arch 2022-11-28
Participants:

 Description   

Due to the use of the executor in AsyncTry as part of it's outer async-loop, it's possible for sendHedgedCommand to return executor shutdown errors without rewriting them into RemoteCommandExecutionErrors. If targeting fails, the same issue can occur, because that failure occurs in the outer loop as well (i.e. evades the error-rewriting logic in the calls to async_rpc::sendCommand). 

 

In this ticket, add tests for:

  • async_rpc::sendHedgedCommand's call to Targeter::resolve returning an error
  • executor shutdown while async_rpc::sendHedgedCommand has not yet produced a result

Ensure that in each case, the sendHedgedCommand API returns a RemoteCommandExecutionError with the appropriate underlying error wrapped. 



 Comments   
Comment by George Wangensteen [ 15/Nov/22 ]

Done in https://github.com/mongodb/mongo/commit/c8c87a09e3b07543e7422172cacdb95257c497b3

Generated at Thu Feb 08 06:18:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.