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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.1, 4.1.1
    • Component/s: Replication, Shell
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Sprint:
      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

            • Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: