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

ServiceStateMachine does correctly bind Client to threads

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Service Arch

    Description

      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.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: