Currently, index builds are restarted from the beginning. To be able to resume an index build, we require the temporary tables used by the hybrid index build to be preserved on startup and the progress information in the internal index build table (one table per index build).
This ticket implements the resumable index build logic for index builds that were shut down during the bulk load phase. The internal ident for the index build should have the following phase:
{ _id: <build uuid>, phase: "bulk load", ... }
If shutdown is initiated in the second phase (where the bulk loader is being used to build each index table, serially), the bulk load will be aborted and the same information, other than the "phase" value, is saved as from the first phase. On restart, the bulk load of all the tables will begin anew. We must ensure the unfinished index tables are empty before starting a new bulk load, by dropping and recreating the tables.
If the second phase completes successfully, each Sorter temporary file is deleted.
- is depended on by
-
SERVER-50095 Augment ResumableIndexBuildTest to ensure that index builds are resumed from the correct phase
- Closed
- is related to
-
SERVER-50131 Extend SorterTests to cover constructing a NoLimitSorter from existing ranges
- Closed
-
SERVER-58197 Pass ranges by reference when constructing a Sorter from existing ranges
- Closed
- related to
-
SERVER-50221 Keep NoLimitSorter aware of its in-memory data even after calling done()
- Closed
-
SERVER-49163 extend internal index build interfaces to accept resumable index build information
- Closed