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

replset mutex should be not be held during DB lock attempts

    • ALL

      Result: Elections will not proceed correctly until heartbeats are processed.

      Repro:

      1. fsyncLock() secondary (XXX:27019)
      2. raise the priority for the PRIMARY (XXX:27017) and issue rs.reconfig()
      3. shut down the PRIMARY
      4. observe that another SECONDARY (XXX:27018) cannot be elected since the fsyncLock'ed one vetoes it:
        Wed Oct  9 11:58:21.339 [rsMgr] not electing self, XXX:27019 would veto with 'XXX:27018 is trying to elect itself but XXX:27017 is already primary and more up-to-date'
        
      5. fsyncUnlock() the SECONDARY ( XXX:27019 ), observe the XXX:27018 being elected

      Expected behavior:
      Write locks should not prevent an election or delay detecting replica set node state changes. This message is an example:

      Wed Oct  9 11:51:01.864 [rsHealthPoll] replSet member XXX:27017 is now in state DOWN
      

      Ideally, XXX:27019 should vote for XXX:27018 (see SERVER-11059).

            Assignee:
            matt.dannenberg Matt Dannenberg
            Reporter:
            alex.komyagin@mongodb.com Alexander Komyagin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: