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

Index build abort can race with stepdown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc8, 4.7.0
    • Affects Version/s: 4.4.0
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-06-15
    • 20

      The contract for aborting an index build is that once the aborting thread acquires the RSTL, the collection X lock, and kills the builder thread, it must follow-through with the abort by writing an "abortIndexBuild" oplog entry. Otherwise, the index build is left unfinished on disk with no means of making progress.

      In a special race, a step-down can interrupt the final write, after the RSTL has been acquired, causing the server to crash.

      We should consider making this critical section resilient to being interrupted.

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

              Created:
              Updated:
              Resolved: