-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.7.9
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.0
-
Repl 2018-05-21, Repl 2018-06-04, Repl 2018-06-18
The findOne below gets a "readConcern level snapshot is only valid in multi-statement transactions" even though it is in a transaction.
ses = db.getMongo().startSession() dbs = ses.getDatabase("test") printjson(dbs.createCollection("c", {writeConcern: {w: "majority"}})) printjson(ses.startTransaction()) printjson(dbs.c.findOne({$where: "sleep(2000)"}))