-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2020-07-27, Service Arch 2020-08-10
-
0
ServiceStateMachine currently dispatches and schedules through a central function here. We should convert it to a future chain with four callbacks:
- Source (or skip if exhaust)
- Process a.k.a. Parse and handle
- Sink (or skip if moreToCome)
- Cleanup and Poll
This will make maintaining this code easier and it also allows us to do future continuations in any of these callbacks. For source and sink steps, they are already futurized via the SessionASIO. For the process step, we can convert ServiceEntryPoint::handleRequest() to return a Future<DbResponse> instead of a DbResponse. This means that command responses that would block on thread can now be fully asynchronous instead. It also means that if a request should be processed on a dedicated thread, we can schedule onto the right executor and return a future that runs inline on it.
- depends on
-
SERVER-48978 Futurize ServiceEntryPoint::handleRequest()
- Closed
- is related to
-
SERVER-50867 Roll back ServiceStateMachine changes temporarily
- Closed
- related to
-
SERVER-50141 ServiceStateMachineTest needs to be rewritten
- Closed