Audit all uses of _replExecutor and check shutdown in scheduled tasks

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Service Arch
    • ALL
    • 5
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Service Architecture
            Reporter:
            Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: