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:
- synchronize the shutdown of the index build thread with the rollback abort thread; or
- have the index build thread write out the resumable index build state under both rollback and shutdown scenarios.
- is related to
-
SERVER-46560 Make Abort index build logic deterministic.
- Closed
-
SERVER-51238 index build has incorrect phase after aborting for rollback
- Closed
-
SERVER-51008 adjust rollback to resume index build from phase 3 (catch up from side table)
- Closed