[SERVER-73293] Make sure range deleter service is up before accessing `_rangeDeletionTasks` Created: 25/Jan/23 Updated: 29/Oct/23 Resolved: 30/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.2.0-rc6 |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Pierlauro Sciarelli |
| 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: |
v6.2
|
||||||||||||||||
| Sprint: | Sharding EMEA 2023-02-06 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 130 | ||||||||||||||||
| Description |
|
During stepUp of RangeDeleterService we call _joinAndResetState() without the class mutex. As part of this function we also clear _rangeDeletionTasks. In general the public API of this service calls _acquireMutexFailIfServiceNotUp so we would expect that no external thread would access the _rangeDeletionTasks before the service initialization is completed and the _state is set to kUp. There are two special public API that uses _acquireMutexUnconditionally and then access the _rangeDeletionTasks object: This means that these two functions can access the _rangeDeletionTasks object while the service is still down and potentially at the same time that the _joinAndResetState() is clearing it. |
| Comments |
| Comment by Githook User [ 30/Jan/23 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |