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

Make ReplSetTest's getPrimary wait until only one node is in the primary state

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc9, 4.7.0
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4
    • Repl 2020-05-04, Repl 2020-05-18, Repl 2020-06-01
    • 9

      When a node steps up, it will increment the config term. It will then store the new config document. On a slow machine, this could take a long time and delay when the node starts accepting writes.

      While this is going on, a test could be waiting until the node transitions to primary before getting the new primary and doing a write. During this time, the old primary could still think it is primary. A call to getPrimary would return the old primary if the new primary cannot accept writes yet (such as in the situation described above).

      We should make sure that getPrimary waits until only one node is in the primary state.

            Assignee:
            ali.mir@mongodb.com Ali Mir
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: