Check DatabaseShardingState for index build commit under an exception handler

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.4.0-rc5, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-05-18
    • 30
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This invariant makes an assumption that index builds will not throw database exceptions except for when they commit, and we hold an X collection lock.

      I thought I covered every exception-throwing region of index builds, but I think I missed a spot. We should move this DatabaseShardingState version check inside the subsequent try-catch block. We're already holding an X lock there so it will abort the index build as usual if the assertion fails.

              Assignee:
              Louis Williams
              Reporter:
              Louis Williams
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: