Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1979

Use mongoc_client_get_handshake_description for LoadBalancer server types

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.11.0
    • 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.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: