-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service arch 2020-06-29, Service arch 2020-07-13, Service Arch 2020-07-27, Service Arch 2020-08-10
ServiceEntryPoint is the second piece of our command pathway after ServiceStateMachine. They meet here when handleRequest() is invoked. Let's convert that virtual function signature,
DbResponse handleRequest(OperationContext* opCtx, const Message& request);
will become
Future<DbResponse> handleRequest(OperationContext* opCtx, const Message& request) noexcept;
Futures can be made from their payload type (see here), so converting each overridden function for derived classes should be simple for now. The noexcept implies that no exception should ever leave handleRequest().
Once we have that future in ServiceStateMachine::_processMessage(), we can take the post processing here as an onCompletion() callback and then call get() to synchronize the asynchronous execution on the local thread.
- is depended on by
-
SERVER-49104 Futurize ServiceStateMachine transitions
- Closed
- is related to
-
SERVER-46653 Guard return path from ServiceEntryPoint to prevent undefined behavior
- Open