-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Component/s: Logging
-
None
-
Needed
Summary
PYTHON-5510 identified a bug in Python's logging where commitTransaction would generate server selection log messages with "abortTransaction":
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}
We should consider adding a standardized logging spec test this case.
Motivation
If the problem does occur, what are the consequences and how severe are they?
Minor annoyance/confusion at a log message.
Is this issue urgent?
No.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
Test only
Acceptance Criteria
Add logging spec test for commitTransaction and abortTransaction to ensure server selection logs the correct operation name.
- is related to
-
PYTHON-5510 Server selection log shows "abortTransaction" instead of "commitTransaction"
-
- Closed
-
- related to
-
PYTHON-5510 Server selection log shows "abortTransaction" instead of "commitTransaction"
-
- Closed
-