[SERVER-69592] Solidify executor semantics for async command runner Created: 12/Sep/22  Updated: 29/Oct/23  Resolved: 14/Oct/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

Issue Links:
Related
related to SERVER-70587 Complete TODO listed in SERVER-69592 Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2022-10-17
Participants:

 Description   

Right now, the remote command running API accepts an ExecutorPtr as input which it uses to perform the asynchronous work. The shutdown of this executor is the only case presently when a non-RemoteCommandExecutionError can be returned by the API.

If we continue to allow for this, we should document it clearly in the code. Alternatively, we could consider using unsafeToInlineFuture to re-write executor shutdown errors into oRemoteCommandExecutionErrors, the way we do for other errors, or ban executor shutdown while RPC events are outstanding as a part of this API's contract. We could also consider  allowing our API to have it's own executor used for RPC with process-lifetime lifetime, sidestepping this issue entirely - or a mix of these ideas, such as taking in an executor as input optionally but having an 'owned' one as default.

The purpose of this ticket is to investigate the tradeoffs between these options, discuss them with stakeholders, and make a decision as to the executor semantics for this API. Then update this ticket description with the conclusion, and make any required code changes.

 

Update after 6WR: We're going to have the API obey the contract that it always returns ErrorCodes::RemoteCommandExecutionError; it will re-write executor shutdowns to such an error and contain the originating error information in the EEI. 

 



 Comments   
Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}

Message: SERVER-69592 Handle executor shutdown in RCR api
Branch: master
https://github.com/mongodb/mongo/commit/7f051a949596e69fa1543ec964e27b64a5e5571a

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