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

ServiceStateMachine does correctly bind Client to threads

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch

      I don’t believe the current SSM is correct in borrowed thread model. We use _clientStrand->run to start the WorkItem’s loop iteration, but this is only one callback on the executor, and it will cause a chain of subsequent callbacks until the WorkItem is completed. These will all use the same executor but they will not use the same thread. This needs to be fixed. We should be using _clientStrand->makeExecutor to create an executor on which all tasks are automatically executed while bound to that ClientStrand. A tweak to ServiceExecutorContext will be necessary because ClientStrand::makeExecutor takes a shared_ptr, not raw pointer.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: