[SERVER-73696] Add JS test for secondary stepping up to primary after preparing transactions under different batching scenarios Created: 07/Feb/23  Updated: 06/Apr/23  Resolved: 06/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Wenbin Zhu Assignee: Wenbin Zhu
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Sprint: Repl 2023-04-17
Participants:

 Description   

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.


Generated at Thu Feb 08 06:25:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.