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