[SERVER-42510] Fix race in too_stale_secondary.js Created: 30/Jul/19 Updated: 29/Oct/23 Resolved: 08/Aug/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lingzhi Deng | Assignee: | Lingzhi Deng |
| 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 | ||||||||||||
| Sprint: | Repl 2019-08-12 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 7 | ||||||||||||
| Description |
|
I think there is a race in the test. The test waits for a node to be in RECOVERING state because of "too stale". However, when a node starts up, it always go through RECOVERING state as part of the start up process. The intention of the test is to ensure that a secondary that has gone "too stale" will transition back to RECOVERING from SECONDARY state. But simply waiting for RECOVERING state is problematic because we can't tell whether RECOVERING is part of start up or is because of "too stale". If the node is still in RECOVERING as part of the startup, the subsequent assert(tooStale(replTest.nodes[2])); would fail. I think "too stale" implies that the node is in RECOVERING. A fix would be to assert.soon on tooStale() and then ensure the node is in RECOVERING state. |
| Comments |
| Comment by Githook User [ 08/Aug/19 ] |
|
Author: {'name': 'Lingzhi Deng', 'username': 'ldennis', 'email': 'lingzhi.deng@mongodb.com'}Message: |