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

Make the callback for the hello command in SingleServerDiscoveryMonitor not take the mutex if the command was canceled due to shut down

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding
    • ALL
    • 16

      Currently, the callback for the hello command sent by the SingleServerDiscoveryMonitor takes the mutex before checking for shut down. We could let a thread lock in the case where the ReplicaSetMonitor task executor thread acquires SingleServerDiscoveryMonitor's mutex when calling SingleServerDiscoveryMonitor::shutdown and then tries to acquire it again when calling the callback function after cancelling pending a hello command. To avoid this, the callback should not take the mutex if the status is CallbackCanceled. 

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: