SERVER-114045 prepared_transaction_kill_during_step_up_refresh.js should wait for commit point to advance before committing txn (#49575)

GitOrigin-RevId: dff7158f8cd67fe7ae39b891aa7da8d953316dd5
This commit is contained in:
Pavi Vetriselvan 2026-03-19 17:07:54 -04:00 committed by MongoDB Bot
parent 95cb4b17ab
commit 29ef9d8ed8

View File

@ -56,6 +56,11 @@ jsTestLog("Allowing step up to continue");
stepUpFP.off();
assert(newPrimary, rst.getPrimary());
// The prepare entry must be majority committed on the new primary before we issue the
// commitTransaction command.
jsTestLog("Ensure prepare entry made it into the committed snapshot on the new primary");
PrepareHelpers.awaitMajorityCommitted(rst, prepareTimestamp);
jsTestLog("Committing transaction on the new primary");
// Create a proxy session to reuse the session state of the old primary.
const newSession = new _DelegatingDriverSession(newPrimary, session);