summaryrefslogtreecommitdiff
path: root/jstests/concurrency
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2018-12-20 19:56:53 -0500
committerJack Mulrow <jack.mulrow@mongodb.com>2019-01-03 17:55:08 -0500
commit4be5caeab1810c7c58f205f5eaf66cf97fb07b9e (patch)
tree4f78a0ededafa9b2eae1d0194b23d51bdf66bfb2 /jstests/concurrency
parentb7c5662bbb9c1e0c562b0dcf700547f387911661 (diff)
downloadmongo-4be5caeab1810c7c58f205f5eaf66cf97fb07b9e.tar.gz
SERVER-38733 Change majority read concern transaction passthroughs to use local read concern
Diffstat (limited to 'jstests/concurrency')
-rw-r--r--jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js b/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
index 8877363e2a4..b05323d9f39 100644
--- a/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
+++ b/jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
@@ -19,6 +19,10 @@ var {withTxnAndAutoRetry} = (function() {
}
}
+ // Use a "signature" value that won't typically match a value assigned in normal use. This way
+ // the wtimeout set by this override is distinguishable in the server logs.
+ const kDefaultWtimeout = 5 * 60 * 1000 + 789;
+
/**
* Runs 'func' inside of a transaction started with 'txnOptions', and automatically retries
* until it either succeeds or the server returns a non-TransientTransactionError error
@@ -32,7 +36,10 @@ var {withTxnAndAutoRetry} = (function() {
*/
function withTxnAndAutoRetry(session, func, {
txnOptions: txnOptions = {
- readConcern: {level: TestData.defaultTransactionReadConcernLevel || 'snapshot'}
+ readConcern: {level: TestData.defaultTransactionReadConcernLevel || 'snapshot'},
+ writeConcern: TestData.hasOwnProperty("defaultTransactionWriteConcernW")
+ ? {w: TestData.defaultTransactionWriteConcernW, wtimeout: kDefaultWtimeout}
+ : undefined
},
retryOnKilledSession: retryOnKilledSession = false,
prepareProbability: prepareProbability = 0.0