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

Stepdown can deadlock with storing lastVote via journal flusher

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Replication
    • ALL
    • 25

      As part of storing the lastVote document, we will wait for it to be durable, and we will eventually call into refreshOplogTruncateAfterPointIfPrimary. This needs to acquire a global IX lock as part of an AutoGetCollection. This can deadlock with stepdown, as it tries to clear the oplog truncate after point, which in turn waits on a journal flush. The journal flusher needs to be able to run wait for durability too, but it cannot get to the critical section as that is protected by a mutex which is already held by the lastVote thread.

      We recently made storing the lastVote document fully uninterruptible in SERVER-47612.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            vesselina.ratcheva@mongodb.com Vesselina Ratcheva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: