Currently, on a clean shutdown, the index build process leave the state of the catalog entry for the index build in a ready:false state. To support resumable index builds, we propose to also write a document detailing the current progress of the index build to an internal table during the shutdown procedure. This ticket will add the required functionality to the shutdown code/internal interfaces to support this write operation. The actual progress information for the index build will be kept minimal and should not affect existing recovery logic for index builds at startup.
Additional details on the internal table:
- one table per index build
- just basic info for now to verify table write operation at shutdown (and read at startup).
- key: <index build uuid>
- value: (BSON) {
_id: <index build UUID>,
phase: “unknown”,
collectionScanPosition, RecordId(0),
indexes: [
{
tempDir: “”, // leave blank
fileName: “”, // leave blank
ranges: [], // empty array
tempDir: “”,
sideWritesTable: <ident>, // actual ident, if available
dupKeyTempTable: <ident>, // actual ident, if available
skippedRecordTrackerTable: <ident>, // actual ident, if available
],
- related to
-
SERVER-48416 write index build progress to internal table on clean shutdown
- Closed