-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Python Drivers
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
Server selection logs remainingTimeMS in seconds not milliseconds:
2025-04-04 15:50:54,456 DEBUG logger {"message": "Waiting for suitable server to become available", "selector": "Primary()", "operation": "find", "topologyDescription": "<TopologyDescription id: 67f0624ee2150dc865f9bef6, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('cluster0-shard-00-00-gh2ak.mongodb.net', 27017) server_type: Unknown, rtt: None>, <ServerDescription ('cluster0-shard-00-01-gh2ak.mongodb.net', 27017) server_type: Unknown, rtt: None>, <ServerDescription ('cluster0-shard-00-02-gh2ak.mongodb.net', 27017) server_type: Unknown, rtt: None>]>", "clientId": {"$oid": "67f0624ee2150dc865f9bef6"}, "remainingTimeMS": 29}
The bug is here:
https://github.com/mongodb/mongo-python-driver/blob/b40223938c9646e0b1a8f60d22e36120991b394d/pymongo/asynchronous/topology.py#L357
_debug_log(
_SERVER_SELECTION_LOGGER,
message=_ServerSelectionStatusMessage.WAITING,
...
remainingTimeMS=int(end_time - time.monotonic()),