[SERVER-42004] localhost{1,2,3}.js tests should wait for a primary to be elected before shutting down the test Created: 28/Jun/19 Updated: 29/Oct/23 Resolved: 17/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc3, 4.3.1, 4.0.20 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | William Schultz (Inactive) | Assignee: | William Schultz (Inactive) |
| 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.2, v4.0
|
||||||||
| Participants: | |||||||||
| Linked BF Score: | 15 | ||||||||
| Description |
|
The replsets/localhost{1,2,3}.js tests start a replica set using ReplSetTest and then call the replSetInitiate command directly on the first node. They then immediately stop the ReplSetTest. Since they don't wait for a primary to actually complete its first election, it's possible that the work done inside stopSet ends up running alongside the election, which can cause things like collection validation to fail when we run consistency checks. We should wait for a primary to finish its election before shutting down the test to avoid these issues. |
| Comments |
| Comment by Githook User [ 24/Jun/20 ] |
|
Author: {'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}Message: (cherry picked from commit 19d0d47fb83d01edb18e0bcb235d6c39bbe16bbd) |
| Comment by Githook User [ 17/Jul/19 ] |
|
Author: {'name': 'William Schultz', 'username': 'will62794', 'email': 'william.schultz@mongodb.com'}Message: (cherry picked from commit 19d0d47fb83d01edb18e0bcb235d6c39bbe16bbd) |
| Comment by Githook User [ 17/Jul/19 ] |
|
Author: {'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}Message: |