Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49072

Make ServiceExecutors into Decorations

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service arch 2020-07-13, Service Arch 2020-07-27, Service Arch 2020-08-10, Service Arch 2020-08-24

      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.

            Assignee:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Reporter:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: