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

indexbg_restart_secondary.js can race processing a commitIndexBuild oplog entry and interrupting an index build due to shutdown

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.3
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-01-27
    • 18

    Description

      When secondaries receive exceptions during index builds, they rethrow immediately. This results in the index build also getting torn down immediately, because we call abortIndexBuildWithoutCleanup() while tearing down the index build.

      Once the index build thread tears down, it unregisters itself. If the oplog applier is concurrently processing of the commitIndexBuild oplog entry, the call to abortIndexBuild will throw a NoSuchKey error here. We ignore NoSuchKey, so the commitIndexBuild gets processed and the stable timestamp is allowed to advance.

      Upon restarting, the unfinished index build will never be completed because the "commitIndexBuild" has already been processed without successfully committing the index.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: