-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
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.