Index build bulk builder does not handle WriteConflictExceptions

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.4.0
    • Component/s: None
    • None
    • Storage Execution
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      There is a region in index builds with no WriteConflictException handling. This can cause exceptions to escape, fail the index build, and crash with the following exception:

      Invariant failure {"expr":"status.isA<ErrorCategory::Interruption>() || status.isA<ErrorCategory::ShutdownError>()","msg":"Unexpected error code during index build cleanup: WriteConflict: WriteConflict error: this operation conflicted with another operation. Please retry your operation or multi-document transaction.","file":"src/mongo/db/index_builds_coordinator.cpp","line":2475}
      

      This exception can be propagated from here while inserting keys from the external sorter into the bulk loader.

      The nature of the WriteConflict at this point cannot be a logical write-write conflict, because the index builder has exclusive access to the table at this point. It would have to be caused by WiredTiger forcing old transactions to roll-back in the event of cache pressure.

            Assignee:
            [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            Louis Williams
            Votes:
            2 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: