[SERVER-51255] rollback persists resumable index info before index build thread is cleaned up Created: 30/Sep/20 Updated: 29/Oct/23 Resolved: 08/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benety Goh | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pm-1344 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Execution Team 2020-10-19 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 37 | ||||||||||||||||
| Description |
|
When an index build is interrupted for shutdown, the index build thread is responsible for persisting the resumable information to disk. This is done in the IndexBuildsCoordinator::_cleanUpTwoPhaseAfterFailure() function. For rollback, the resumable index build information is written to disk in the thread (typically BackgroundSync) that is stopping the index build before starting the rollback process. The state of the index build thread is unclear at this point. In most cases, the index build is in a valid state for us to extract the resumable index build information This inconsistency between rollback and shutdown with respect to writing out the resumable index information means that we would either have to:
|
| Comments |
| Comment by Githook User [ 06/Oct/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 05/Oct/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 05/Oct/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Benety Goh [ 01/Oct/20 ] |
|
Currently index builds are interrupted with the same IndexBuildAborted error code for both resumable (abortIndexBuild oplog entry) and non-resumable (rollback) scenarios. We could consider using a different error code (maybe IndexBuildAbortedForRollback?) from IndexBuildAborted to facilitate the decision making in IndexBuildsCoordinator::_cleanUpTwoPhaseAfterFailure(). |