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

abortTransaction on mongos fails with BSON field 'abortTransaction.recoveryToken' is an unknown field

    • Minor Change
    • ALL
    • Repl 2021-01-25

      Running abortTransaction on 4.9 mongos with a recoveryToken results in the following error:

      {"ok": 0.0, "errmsg": "BSON field 'abortTransaction.recoveryToken' is an unknown field.", "code": 40415, "codeName": "Location40415", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1610655278, "i": 9}}, "signature": {"hash": {"$binary": {"base64": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "subType": "00"}}, "keyId": 0}}, "operationTime": {"$timestamp": {"t": 1610655278, "i": 9}}}
      

      The full command was:

      {"abortTransaction": 1, "recoveryToken": {"recoveryShardId": "demo-set-0"}, "writeConcern": {"w": "majority"}, "lsid": {"id": {"$binary": {"base64": "fKTNnHJNRmqnwO4wxtVj1g==", "subType": "04"}}}, "txnNumber": 1, "autocommit": false, "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1610655278, "i": 9}}, "signature": {"hash": {"$binary": {"base64": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "subType": "00"}}, "keyId": 0}}, "$db": "admin", "$readPreference": {"mode": "primary"}}

      The server version:

      mongos version v4.9.0-alpha-1297-g0edda21
      Build Info: {
          "version": "4.9.0-alpha-1297-g0edda21",
          "gitVersion": "0edda21e200d7d7186f236e54bb331c402cdeb1a",
          "modules": [
              "enterprise"
          ],
          "allocator": "system",
          "environment": {
              "distarch": "x86_64",
              "target_arch": "x86_64"
          }
      }
      

      This is unexpected because drivers send recoveryToken on both commitTransaction and abortTransaction as decided in SERVER-39692 (and implemented in DRIVERS-635).

            Assignee:
            m.maher@mongodb.com Moustafa Maher
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: