[SERVER-54671] Ensure TopologyVersionObserver is always interrupted at shutdown Created: 19/Feb/21 Updated: 29/Oct/23 Resolved: 03/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Luis Osta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | save-for-luis, servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Service Arch 2021-05-17 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 22 | ||||||||
| Description |
|
The shutdown method for ToplogyVersionObserver must interrupt the _workerOpCtx to ensure that the observer thread always returns (see here). However, the observer thread may create a new opCtx after checking if a shutdown is in progress (see here), violating this contract and introducing hangs. A simple fix to address this issue is to check the shutdown flag when holding the mutex and before setting _workerOpCtx.
|
| Comments |
| Comment by Githook User [ 03/May/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |