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

Invariant failure involving a collection drop (external index build abort) racing with an internal index build abort

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2023-04-03, Execution Team 2023-04-17
    • 135

      1. Start an index build.
      2. Drop the underlying collection. The index build transitions to Status::kAborted.
      3. Concurrent with 2, while still ongoing, the index build detects an error (e.g. invalid geo value) and attempts to transition to State::kAwaitPrimaryAbort. This transition is not allowed, and the mongod fails this invariant.

      I believe this scenario only applies when featureFlagIndexBuildGracefulErrorHandling is on.
       
      Some options:

      • Allow a transition from kAborted or kAwaitPrimaryAbort. This seems unlikely, as most of the index build context may be gone by the time we're in kAborted state.
      • Interpret a transition to kAwaitPrimaryAbort state as "nothing else to do" if we're already in kAbort.
      • Make external aborts go through the kAwaitPrimaryAbort state, that is, through the voteAbortIndexBuild path.

            Assignee:
            josef.ahmad@mongodb.com Josef Ahmad
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: