[SERVER-58258] Wait for initial sync to clear state before asserting 'replSetGetStatus' reply has no 'initialSync' field Created: 02/Jul/21 Updated: 29/Oct/23 Resolved: 06/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.16, 4.4.8, 5.0.2, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Wenbin Zhu | Assignee: | Wenbin Zhu |
| 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: |
v5.0, v4.4, v4.2
|
||||||||
| Sprint: | Repl 2021-07-12 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 24 | ||||||||
| Description |
|
initial_sync_replSetGetStatus.js waits for the initial syncing node to transition into SECONDARY state and then assert the 'replSetGetStatus' command reply does not contain 'initialSync' field. However it's possible that the node transitioned to SECONDARY state during the onCompletion callback before resetting the _initialSyncState. When responding to the 'replsetGetStatus' command, if _initialSyncState is not reset, the response will still include the `initialSyncStatus` field, causing the assertion to fail. One solution is to add a fail point after resetting _initialSyncState and wait in the test. Another option can be using assert.soon(), but using fail point can test it a more deterministic manner. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 21/Jul/21 ] |
|
Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}Message: (cherry picked from commit f4860f196c4c7cc335955361865f3511d0c73606) |
| Comment by Githook User [ 20/Jul/21 ] |
|
Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}Message: (cherry picked from commit f4860f196c4c7cc335955361865f3511d0c73606) |
| Comment by Githook User [ 20/Jul/21 ] |
|
Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}Message: (cherry picked from commit f4860f196c4c7cc335955361865f3511d0c73606) |
| Comment by Githook User [ 06/Jul/21 ] |
|
Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}Message: |