[SERVER-47487] Make ReplSetTest's getPrimary wait until only one node is in the primary state Created: 11/Apr/20 Updated: 29/Oct/23 Resolved: 26/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc9, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samyukta Lanka | Assignee: | Ali Mir |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.4
|
||||||||
| Sprint: | Repl 2020-05-04, Repl 2020-05-18, Repl 2020-06-01 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 9 | ||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 03/Jun/20 ] |
|
Author: {'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}Message: (cherry picked from commit 41c684aa3589406853aac7b3f40c34889821f053) |
| Comment by Githook User [ 26/May/20 ] |
|
Author: {'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}Message: |