Build commands after connection checkout

XMLWordPrintableJSON

    • Build Commands After Checkout
    • Node Drivers
    • None
    • 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?
    • In Progress
    • 5
    • 4
    • 5
    • 100
    • 0
    • None
    • None
    • Hide

      Engineer(s): Durran Jordan, Bailey Pearson
      2025-08-15: Target date updated to 2025-08-22

      Known risks or blockers:

      • None (calendar date update due to parallel focus on other priorities).
        Completed over the last 2 weeks:
      • All commands but 7 have been refactored; the final 7 are nearly complete (PR to enter review soon).
        Focus over the next 1 week:
      • Wrap up project.

      Engineer(s): Bailey Pearson, Durran Jordan
      2025-08-01: Target date set to 2025-08-15

      Known risks or blockers:

      • N/A

      Completed over the last 2 weeks:

      • A tech design was written and approved
      • Completed most of the preliminary refactors for the project.

      Focus over the next 2 weeks:

      • Wrap up preliminary refactors (setting up for the migration of each operation class to the new design, and removing the Node driver's extra `ping` on MongoClient connect).
      • Refactor the Node driver's operation classes to build commands post connection checkout.

      Show
      Engineer(s): Durran Jordan, Bailey Pearson 2025-08-15: Target date updated to 2025-08-22 Known risks or blockers: None (calendar date update due to parallel focus on other priorities). Completed over the last 2 weeks: All commands but 7 have been refactored; the final 7 are nearly complete (PR to enter review soon). Focus over the next 1 week: Wrap up project. Engineer(s): Bailey Pearson, Durran Jordan 2025-08-01: Target date set to 2025-08-15 Known risks or blockers: N/A Completed over the last 2 weeks: A tech design was written and approved Completed most of the preliminary refactors for the project. Focus over the next 2 weeks: Wrap up preliminary refactors (setting up for the migration of each operation class to the new design, and removing the Node driver's extra `ping` on MongoClient connect). Refactor the Node driver's operation classes to build commands post connection checkout.
    • 5
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      The Node driver's operation execution flow looks roughly like the following:

      • check if connected, auto connect if needed
      • select server
      • obtain session
      • build the command
      • checkout a connection
      • execute the command

      Some operations require information about the selected server (maxWireVersion,  maxBSONSize, etc) when constructing the command.  This data is usually obtained from the server's server description, which is populated after the monitor connects during SDAM.

      In load balanced mode, we don't perform SDAM.  This means that any command that relies on data from the server description might not have accurate information.

      There are two solutions to this problem that I can think of:

      1. propagate handshake information from connection establishment up into the topology and store it in a fake server description for LB mode specifically.
      2. build commands after connection checkout, obtaining server information from the connection's `StreamDescription`

      Of these options, 2 seems like a better solution.

      User Experience

       

      Dependencies

      n/a

      Risks/Unknowns

      n/a

      Acceptance Criteria

      Implementation Requirements

      • functional reqs, potential snafus to avoid, performance targets, etc

      Testing Requirements

      • unit test, spec test sync, etc

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc
      • if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward

              Assignee:
              Bailey Pearson
              Reporter:
              Bailey Pearson
              Daria Pardue Daria Pardue
              Alex Bevilacqua Alex Bevilacqua
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                4 weeks, 1 day
                None
                None
                None
                None