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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.1, 4.1.1
    • Affects Version/s: None
    • Component/s: Replication, Shell
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2018-07-02, Repl 2018-07-16

      > 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)
      		}
      	}
      })
      

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

              Created:
              Updated:
              Resolved: