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

Index build bulk builder does not handle WriteConflictExceptions

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.0
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • ALL

      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:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            2 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: