Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3881

Require hello command + OP_MSG when 'loadBalanced=True'

    • 2
    • Hide

      DRIVERS-2033:
      This ticket is an add-on to DRIVERS-1916. This ticket similarly specifies drivers must ensure that if load balancing mode is enabled, both "hello" and OP_MSG should be used for the connection handshake.
      For an example of what your connection process should look like after this change, take a look at the Python pseudocode implementation in the handshake spec.

      Show
      DRIVERS-2033: This ticket is an add-on to DRIVERS-1916. This ticket similarly specifies drivers must ensure that if load balancing mode is enabled, both "hello" and OP_MSG should be used for the connection handshake. For an example of what your connection process should look like after this change, take a look at the Python pseudocode implementation in the handshake spec.
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      This ticket was split from DRIVERS-2033, please see that ticket for a detailed description.

      Acceptance Criteria

      **

      Implementation Requirements
      When performing an initial handshake send the hello command instead of the legacy hello command if loadBalanced option is specified. Also send command OP_MSG instead of OP_QUERY.

      Testing Requirements

      • prepareHandshakeDocument sets the hello parameter to 1 when loadBalanced is true
      • prepareHandshakeDocument sets the legacy hello parameter to 1 when serverApi and loadBalanced are not present
      • add a unit test for a load-balanced to verify that the first command is sent as OP_MSG
      • add a unit test for a not load-balanced to verify that the first command is sent as OP_QUERY

      Documentation Requirements
      None

      Follow Up Requirements
      None

            Assignee:
            alena.khineika@mongodb.com Alena Khineika
            Reporter:
            dbeng-pm-bot PM Bot
            Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: