ServiceExecutors are executors: asynchronous task queues processed by one or more threads. When the ServiceStateMachine needs to queue a new iteration of the command loop, it schedules that work onto a ServiceExecutor (see here). For normal users, all executors are either the ServiceExecutorSynchronous or the ServiceExecutorReserved (which is set here). We want to allow a Client to chose its own ServiceExecutor, so we need to provide stronger lifetime guarantees and better access patterns.
Each ServiceExecutor should be a Decoration on the ServiceContext (here is an example). This makes these executors close to immortal.
We'll also want to move the logic for when to chose if we use the ServiceExecutorReserved into the ServiceStateMachine after we make the client here.
- is depended on by
-
SERVER-48980 Associate ServiceExecutors with Clients
- Closed
- is related to
-
SERVER-50867 Roll back ServiceStateMachine changes temporarily
- Closed