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

Abort index builds by interrupting the OperationContext of the builder thread

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Execution Team 2020-04-06, Execution Team 2020-04-20
    • 5

      The current mechanism for aborting index builds through the IndexBuildsCoordinator is to set a flag on the MultiIndexBlock.

      During the index build process we check if this flag has been set a few times. For example, at the begining of each drain phases, of which there are only 3 calls.

      This makes it difficult and unreliable to abort index builds because the window between aborting an index build and it actually tearing down is potentially very wide for large indexes.

      In part because of the deadlock described by SERVER-44722, it would be better to actually interrupt the operation context of the index builder thread. Lock acquisitions or explicit calls to checkForInterrupt() should throw and immediately abort the index build.

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

              Created:
              Updated:
              Resolved: