[SERVER-48062] Index build abort can race with stepdown Created: 08/May/20 Updated: 29/Oct/23 Resolved: 02/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.0 |
| Fix Version/s: | 4.4.0-rc8, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| 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: |
v4.4
|
||||||||||||||||||||
| Sprint: | Execution Team 2020-06-15 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 20 | ||||||||||||||||||||
| Description |
|
The contract for aborting an index build is that once the aborting thread acquires the RSTL, the collection X lock, and kills the builder thread, it must follow-through with the abort by writing an "abortIndexBuild" oplog entry. Otherwise, the index build is left unfinished on disk with no means of making progress. In a special race, a step-down can interrupt the final write, after the RSTL has been acquired, causing the server to crash. We should consider making this critical section resilient to being interrupted. |
| Comments |
| Comment by Githook User [ 02/Jun/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit baf75dd579bfec6554fa881b73cc427f0bbb3309) |
| Comment by Githook User [ 02/Jun/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |