-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Calling mongoc_client_get_server_description on a LoadBalancer server will return an empty document, since load balancers are not monitored. For this reason, CDRIVER-3653 introduced a mongoc_client_get_handshake_description function to return the hello response from the initial connection handshake.
If the Server object corresponds to a LoadBalancer, we should use mongoc_client_get_handshake_description for debug output and getInfo(). This will ensure that a meaningful hello response is available for use cases such as wire version checks.
Other methods (e.g. getHost) can continue to use mongoc_client_get_server_description. This invites a small inconsistency between those methods and the information that will be returned by getInfo, but to do otherwise might completely hide the fact that the server is a load balancer. That could be more problematic, since debugging would be more complicated.
- depends on
-
CDRIVER-3653 Connections should use server descriptions from handshake, not monitoring
- Closed