-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Since load balancers do not utilize SDAM, RTT will never be calculated. The return value from mongoc_server_description_round_trip_time will be -1, which indicates "unset" (see: CDRIVER-4176).
Returning null in this case may be the most sensible API, but if there is a BC concern we could always return -1 instead. If we do change this method to return null for an unset value, we should also update php_phongo_server_to_zval (called by php_phongo_server_get_debug_info) and ensure the "round_trip_time" field is reported consistently.
Server::getLatency() is currently only tested for replica sets (tests/replicaset/server-001.phpt), so we should consider adding more test coverage when addressing this issue.
- is related to
-
PHPC-1984 Incorrect return type in Server::getLatency() documentation
- Closed
-
CDRIVER-4176 Make MONGOC_RTT_UNSET and MONGOC_NO_SERVER_CONNECTION_ID public
- Backlog