diff options
author | Lingzhi Deng <lingzhi.deng@mongodb.com> | 2019-04-09 09:58:04 -0400 |
---|---|---|
committer | Lingzhi Deng <lingzhi.deng@mongodb.com> | 2019-04-09 09:58:04 -0400 |
commit | 67e08418c8e9722768ead723bafda7e229660291 (patch) | |
tree | 541192d94951c97d14947fd5432f3a38cec4d4f9 /jstests/auth/prepared_transaction.js | |
parent | 3150154574757e70f1499e97456956b5376630c8 (diff) | |
download | mongo-67e08418c8e9722768ead723bafda7e229660291.tar.gz |
SERVER-40269: commitTransaction should assert that the prepare oplog entry is majority committed
Diffstat (limited to 'jstests/auth/prepared_transaction.js')
-rw-r--r-- | jstests/auth/prepared_transaction.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/jstests/auth/prepared_transaction.js b/jstests/auth/prepared_transaction.js index e93a9e84004..2864dea5fd5 100644 --- a/jstests/auth/prepared_transaction.js +++ b/jstests/auth/prepared_transaction.js @@ -54,7 +54,8 @@ lsid: lsid, txnNumber: NumberLong(0), stmtId: NumberInt(1), - autocommit: false + autocommit: false, + writeConcern: {w: "majority"} }), ErrorCodes.Unauthorized); @@ -65,7 +66,8 @@ lsid: lsid, txnNumber: NumberLong(0), stmtId: NumberInt(1), - autocommit: false + autocommit: false, + writeConcern: {w: "majority"} })) .prepareTimestamp; const commitTimestamp = Timestamp(prepareTimestamp.getTime(), prepareTimestamp.getInc() + 1); @@ -105,7 +107,8 @@ lsid: lsid, txnNumber: NumberLong(1), stmtId: NumberInt(1), - autocommit: false + autocommit: false, + writeConcern: {w: "majority"} }), ErrorCodes.Unauthorized); @@ -115,7 +118,8 @@ lsid: lsid, txnNumber: NumberLong(1), stmtId: NumberInt(1), - autocommit: false + autocommit: false, + writeConcern: {w: "majority"} }), ErrorCodes.Unauthorized); @@ -165,7 +169,8 @@ lsid: lsid, txnNumber: NumberLong(2), stmtId: NumberInt(0), - autocommit: false + autocommit: false, + writeConcern: {w: "majority"} }), ErrorCodes.Unauthorized); @@ -175,7 +180,8 @@ lsid: lsid, txnNumber: NumberLong(2), stmtId: NumberInt(0), - autocommit: false + autocommit: false, + writeConcern: {w: "majority"} }), ErrorCodes.Unauthorized); |