Server selection log shows "abortTransaction" instead of "commitTransaction"

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 4.15.0
    • Affects Version/s: None
    • Component/s: Logging
    • None
    • 🔵 Done
    • Python Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Server selection log shows "abortTransaction" instead of "commitTransaction":

      DEBUG    pymongo.serverSelection:logger.py:108 {"message": "Server selection started", "selector": "<function writable_server_selector at 0x10652c900>", "operation": "abortTransaction", "topologyDescription": "<...", "clientId": {"$oid": "68a63bfdd879f3f149e6a493"}}
      DEBUG    pymongo.serverSelection:logger.py:108 {"message": "Server selection succeeded", "selector": "<function writable_server_selector at 0x10652c900>", "operation": "abortTransaction", "topologyDescription": "...", "clientId": {"$oid": "68a63bfdd879f3f149e6a493"}, "serverHost": "localhost", "serverPort": 27017}
      ...
      DEBUG    pymongo.command:logger.py:108 {"message": "Command started", "clientId": {"$oid": "68a63bfdd879f3f149e6a493"}, "command": "{\"commitTransaction\": 1, :...}", "commandName": "commitTransaction", "databaseName": "admin", "requestId": 357571490, "operationId": 357571490, "driverConnectionId": 1, "serverConnectionId": 1773, "serverHost": "localhost", "serverPort": 27017}
      

      The bug is here:

              return await self._client._retry_internal(
                  func, self, None, retryable=True, operation=_Op.ABORT
              )
      

      https://github.com/mongodb/mongo-python-driver/blob/cf7a1aaa2f183ac4dddbe3b076f0c71ec55ea7c0/pymongo/asynchronous/client_session.py#L881

              Assignee:
              Shane Harvey
              Reporter:
              Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: