summaryrefslogtreecommitdiff
path: root/jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js
diff options
context:
space:
mode:
authorSuganthi Mani <suganthi.mani@mongodb.com>2019-04-16 11:00:12 -0400
committerSuganthi Mani <suganthi.mani@mongodb.com>2019-04-16 11:00:12 -0400
commit31fa6affccca75dac6e57be8df6f18a6fd02fd12 (patch)
treea672b9ce0bb82fd93d66533ea2370f43cb34b532 /jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js
parent7bd3683b347dfb50e5cf67d607960d3757e13cd4 (diff)
downloadmongo-31fa6affccca75dac6e57be8df6f18a6fd02fd12.tar.gz
SERVER-40422 Modifies jstest to prepare and commit a transaction behind oldest timestamp during rollback recovery.
Diffstat (limited to 'jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js')
-rw-r--r--jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js b/jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js
index e25438164d3..712f7a8286a 100644
--- a/jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js
+++ b/jstests/replsets/rollback_recovery_commit_transaction_before_stable_timestamp.js
@@ -54,6 +54,12 @@
"data": {"timestamp": recoveryTimestamp}
}));
+ // Enable fail point "WTSetOldestTSToStableTS" to prevent lag between stable timestamp and
+ // oldest timestamp during rollback recovery. We avoid this lag to test if we can prepare
+ // and commit a transaction older than oldest timestamp.
+ assert.commandWorked(
+ testDB.adminCommand({"configureFailPoint": 'WTSetOldestTSToStableTS', "mode": 'alwaysOn'}));
+
jsTestLog("Committing the transaction");
// Since this transaction is committed after the last snapshot, this commit oplog entry will be