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

Audit all uses of _replExecutor and check shutdown in scheduled tasks

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

      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:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: