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

Add JS test for secondary stepping up to primary after preparing transactions under different batching scenarios

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Replication
    • Repl 2023-04-17

      The purpose of this tests is to ensure that after secondary applies a batch of split prepared transactions and steps up, the transactions are in the correct state and we can successfully commit them as primary.

      There are different batching scenarios to consider, for example:

      • batch 1: [ prepare(sess1, txnNumber1), prepare(sess2, txnNumber 2) ]
      • batch 1: [ prepare(sess1, txnNumber1) ]; batch 2: [ commit(sess1, txnNumber1), prepare(sess1, txnNumber2), prepare(sess2, txnNumber1) ]
      • batch 1: [ prepare(sess1, txnNumber1), commit(sess1, txnNumber1), prepare(sess1, txnNumber2) ]  (Note: Usually a commit of a transaction will not be in the same batch of the prepare of the same transaction because the prepare oplog has to be majority committed first before transactionCoordinator issues commit to participants. But for secondaries in minority of the replica set, this can happen)

      EDIT: since we are not batching commits with prepares any more, we have just a few scenarios to consider.

            Assignee:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: