Index build abort can race with stepdown

XMLWordPrintableJSON

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

      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
              Reporter:
              Louis Williams
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: