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

Handle Rollbacks in SessionTransactionTable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.10
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2017-07-10, Sharding 2017-07-31

      There will be special logic required for rollback since updates to the systems.transaction won't have any oplog entries and won't be rolled back to the right state.

      This can be resolved by:
      Approach1: copying the full table from the sync source as part of the rollback process. This should be done before the minValid opTime is determined and set. Cons: Can be expensive since there can be many documents that needs to be copied over (one doc per statement)
      Approach2: Remove the corresponding transaction statement entries from transaction table (both in-memory cache and storage) by inspecting the (sessionId, txnNum and stmtId) of the oplog entry. Cons: Cannot revert state back to older transactions in a session.

            jack.mulrow@mongodb.com Jack Mulrow
            randolph@mongodb.com Randolph Tan
            0 Vote for this issue
            3 Start watching this issue