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

Add testing to interleave prepared transactions applyOps oplog entry replay and the corresponding write to the transactions table

    XMLWordPrintable

    Details

      Description

      The transaction prepare and following commit logic contains some pretty tricky combination of oplog writes in different WUsOW (i.e., the actual applyOps oplog write, the write which changes the state to prepared and writes down the prepare timestamp and the final commit oplog entry write, which ensures visibility).

      Due to the concurrency of the applier threads on the secondaries, these oplog entries can be applied in different order, potentially causing interesting race conditions.

      We could potentially make this logic more robust by adding some testing flag or replication failpont to the applier logic, to cause different interleaving between the applyOps and the updates to the transactions table.

      The simplest thing would be to make all updates to the transactions table to happen before everything else in one test and after everything else in another. This should be enough to shake out any race condition bugs.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-repl Backlog - Replication Team
              Reporter:
              kaloian.manassiev Kaloian Manassiev
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: