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

Mongo shell prompt errors when running transactions after overriding "db"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0.1, 4.1.1
    • Replication, Shell
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2018-07-02, Repl 2018-07-16

    Description

      > session = db.getMongo().startSession()
      > db = session.getDatabase('test')
      test
      > session.startTransaction()
      > db.foo.insert({a:1})
      Given transaction number 0 does not match any in-progress transactions.
      WriteCommandError({
      	"errorLabels": [
      		"TransientTransactionError"
      	],
      	"operationTime": Timestamp(1529690056, 1),
      	"ok": 0,
      	"errmsg": "Given transaction number 0 does not match any in-progress transactions.",
      	"code": 251,
      	"codeName": "NoSuchTransaction",
      	"$clusterTime": {
      		"clusterTime": Timestamp(1529690056, 1),
      		"signature": {
      			"hash": BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
      			"keyId": NumberLong(0)
      		}
      	}
      })
      

      Attachments

        Activity

          People

            siyuan.zhou@mongodb.com Siyuan Zhou
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: