Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
3.7.9
-
None
-
Fully Compatible
-
ALL
-
v4.0
-
Repl 2018-05-21, Repl 2018-06-04, Repl 2018-06-18
Description
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)"}))
|