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

Elections can be delayed by some locks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.4.6, 2.5.2
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
    • Environment:
      2-node replica set
    • Operating System:
      ALL

      Description

      When the node is doing initial sync and it's in the index build phase, it will not respond to the replSetElect command.

      Steps to reproduce:

      1. setup a one-node replica set
      2. write a lot of data and create a bunch of indexes
      3. add a new node
      4. wait for the new node to go into the the index building phase after all records are cloned
      5. issue stepDown(3) on the PRIMARY
      6. observe that the election is delayed until index build is finished

      Expected result: to be able to elect a primary if the secondary is doing an initial sync

      Rationale: in more complicated scenarios involving multiple servers doing initial sync and network splits, this bug can lead to significant (depending on the actual indexes) delays in elections

        Attachments

        1. pri.log
          5 kB
        2. queue_elect.js
          1 kB
        3. sec_dbCurrentOp.log
          2 kB
        4. sec.log
          10 kB

          Issue Links

            Activity

              People

              Assignee:
              matt.dannenberg Matt Dannenberg
              Reporter:
              alex.komyagin Alexander Komyagin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: