• Type: Icon: Sub-task Sub-task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 6.4.0
    • Affects Version/s: None
    • Component/s: None
    • 0
    • Not Needed
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed

      Use Case

      ModernConnection is just a copy of Connection, update it to use read/write async helpers. Notably, rework command monitoring due to the fact that it is bound to callback syntax at the moment.

      User Impact

      • None. The old Connection will still be used.

      Dependencies

      • No external dependencies
      • Internally, ModernConnection class, async read/write functions, socket event handling

      Unknowns

      • How should we handle socket errors, closing, and timeouts?
        • Using an AbortController that lives on the Connection class
      • Is it a problem to reinterpret socketTimeoutMS as a total timeout of the read operation vs what it is now which is a timeout of idle-ness between chunks?
        • No it is not a problem, but we ended up not needing to with the controller and signal approach to error handling.

      Acceptance Criteria

      Implementation Requirements

      • Remove MessageStream and socket event handling from Connection ctor
        • Except for 'close'. An idle connection in the ConnectionPool should clean it's self up if the socket closes.
      • Change write(..., cb) call to the new async writeCommand
      • Add a call to async read after the socket has been written to
      • Perform parsing identical to the logic in onMessage
      • Write error handling logic to be enabled before write and disabled after read
        • Make use of AbortController to reject i/o promises

      Testing Requirements

      • Integration test
        • Set an environment variable that makes the driver make connection pool connections with the new class
        • newClient will set connectionType to ModernConnection
        • Run a new typical linux suite (all versions, topologies, lb mode, serverApi)

      Documentation Requirements

      • None

      Follow Up Requirements

      • See parent for next subtasks

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Daria Pardue, Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: