[SERVER-52791] Make PrimaryOnlyService::shutdown explicitly interrupt tracked OperationContexts Created: 11/Nov/20 Updated: 29/Oct/23 Resolved: 22/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Blake Oler |
| 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: | Service arch 2020-12-28, Sharding 2021-02-22 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Story Points: | 1 | ||||||||||||||||
| Description |
|
On shutdown: First ReplicationCoordinator::stepdown is called. Then ReplicationCoordinator::shutdown is called, which calls PrimaryOnlyService::shutdown, which joins all running instances. Finally, all OperationContexts are marked as killed. However, the first step ReplicationCoordinator::stepdown is allowed to fail. In that case, PrimaryOnlyService::shutdown may try to join a running instance whose OperationContext has not been interrupted. To avoid this, PrimaryOnlyService::shutdown should also explicitly interrupt all its OperationContexts. |
| Comments |
| Comment by Githook User [ 18/Feb/21 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: |