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

Use mongoc_client_get_handshake_description for LoadBalancer server types

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.11.0
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: