[SERVER-63579] Prevent initial sync from fasserting when shutting down replication coordinator Created: 11/Feb/22 Updated: 29/Oct/23 Resolved: 11/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Xuerui Fa | Assignee: | Xuerui Fa |
| 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.2
|
||||||||
| Participants: | |||||||||
| Linked BF Score: | 18 | ||||||||
| Description |
|
It seems we recently added functionality to shut down the initial sync early during the step down process. As a result, initial sync now shuts down before the replication coordinator shuts down. As part of shutting down the replication coordinator, we set the _inShutdown flag to true. Since this flag is no longer set to true before initial sync returns, we will never enter this if statement and we instead fassert in initial sync if an error happens in initial sync while shutting down. To resolve this, we should either check the _inTerminalShutdown flag as part of initial sync shutdown, or we should set _inShutdown flag as part of the early initial sync exit. I'm more in favor of the first option, since it seems there is precedence for it. |
| Comments |
| Comment by Githook User [ 11/Feb/22 ] |
|
Author: {'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}Message: |