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

Audit all uses of _replExecutor and check shutdown in scheduled tasks

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • Replication
    • None
    • ALL
    • 5

    Description

      After SERVER-39965, a scheduled task may run on the caller's thread rather than in the thread pool on shutdown. Since the scheduled task can acquire the replication mutex which may have been held by the caller, a deadlock will occur. Heartbeat schedule is an example.

      Due to how heartbeat callbacks is tracked in _heartbeatHandles, it may not be straightforward to check the status and return before acquiring the lock.

      Heartbeat cancellation has also to be considered when working on this ticket. When the heartbeat is cancelled while it's already running or scheduled but hasn't run yet, the ownership of the callback should be clarified. Currently, it's the cancelled callback's job to clear itself.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-servicearch Backlog - Service Architecture
              siyuan.zhou@mongodb.com Siyuan Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: