Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48415

resumable index build writes placeholder document to internal table on clean shutdown

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Execution Team 2020-06-15

      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
          ],

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: