[SERVER-50320] Fix cancellation races in initial syncer Created: 14/Aug/20 Updated: 29/Oct/23 Resolved: 16/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Russotto | Assignee: | Matthew Russotto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | bkp | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v5.0, v4.4
|
||||||||||||||||||||
| Sprint: | Repl 2020-09-07, Repl 2020-09-21 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 10 | ||||||||||||||||||||
| Description |
|
Cancelling an initial sync attempt may be missed if the code has run a callback but the callback has not yet acquired the initial syncer mutex. Since the callback is already running it won't be canceled, and the code has no way to know not to schedule the next callback. This may be a matter of having _checkForShutdownAndConvertStatus_inlock check an overall status, though caution must be taken when a lock may be temporarily released in a callback, and also at least one call of _checkForShutdownAndConvertStatus_inlock occurs (despite the name) outside the lock. |
| Comments |
| Comment by Githook User [ 12/Oct/20 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: (cherry picked from commit 728fc1c52300cd409dd0619ebe669f8d0bd1835a) |
| Comment by Githook User [ 16/Sep/20 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: |