-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.7.4
-
Component/s: Storage
-
None
-
Replication
-
ALL
ses = db.getMongo().startSession() dbs = ses.getDatabase("test") printjson(dbs.createCollection("c", {writeConcern: {w: "majority"}})) print("TRANSACTION 1") printjson(ses.startTransaction()) printjson(dbs.c.insert({_id: 0})) printjson(ses.commitTransaction()) print("TRANSACTION 2") printjson(ses.startTransaction()) printjson(dbs.c.insert({_id: 1})) printjson(ses.commitTransaction())
The second transaction fails with
assert: command failed: { "operationTime" : Timestamp(1524048246, 2), "ok" : 0, "errmsg" : "WriteConflict", "code" : 112, "codeName" : "WriteConflict", "$clusterTime" : { "clusterTime" : Timestamp(1524048246, 3), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } }
- duplicates
-
SERVER-34195 Support speculative readConcern behavior in transactions
- Closed