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

Elections can be delayed by some locks

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.6, 2.5.2
    • Component/s: Replication
    • Environment:
      2-node replica set
    • ALL

      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

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

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

              Created:
              Updated:
              Resolved: