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

Do not block prepared transactions on two-phase index builds on secondaries

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • Execution Team 2019-10-21

      The  index_builds_ignore_prepare_conflicts.js test was disabled by SERVER-43301.

      To make this test pass, disable the fix put in by SERVER-38588 to block prepared transactions on index builds on secondaries.

      When two-phase index builds are in use, it is both unnecessary and unsafe to block a prepared transactions on index builds on secondaries. Due to locking, we can guarantee that a transaction prepared on a primary during an index build will always commit before that index build completes. Because two-phase index builds replicate start and commit oplog entries, it will never be possible to replicate a prepared transaction, commit an index build, then commit the transaction, the bug SERVER-38588 addressed.

      This blocking behavior can also introduce a deadlock with two-phase index builds on a secondary if a prepared transaction blocks on an index build, but the index build can't re-acquire its S or X lock because of the transaction.

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

              Created:
              Updated:
              Resolved: