Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34764

Spurious "readConcern level snapshot is only valid in multi-statement transactions" error

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc5, 4.1.1
    • Affects Version/s: 3.7.9
    • Component/s: Replication
    • Labels:
      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)"}))
      

            Assignee:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: