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

Socket errors from error event handler can be left unconverted to MongoNetworkError

    • Not Needed
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a... Node.js engineer
      I want... any socket error to be converted to a MongoNetworkError
      So that... driver retry and resume logic responds as expected

      User Experience

      • What is the desired/expected outcome for the user once this ticket is implemented?
        • Socket error events are always converted to our MongoNetworkError class, because the driver will not retry plain runtime errors
      • If bug: What is the number of impacted customers? How severe is the impact? Is anyone blocked or broken?
        • The timing has to be right to make the error event handling run and proceed to our "read promise" rejection before the close event occurs.

      Dependencies

      • None

      Risks/Unknowns

      • What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
      • Is there an opportunity for better cross-driver alignment or testing in this area?
      • This is node-specific but it was overlooked because failpoints that close the connection do not cause the "perfect storm" of event ordering.
      • Is there an opportunity to improve existing documentation on this subject?

      Acceptance Criteria

      Implementation Requirements

      • Convert socket errors to MongoNetworkErrors

      Testing Requirements

      • Destroy the socket one micro tick after read and after write and assert a MongoNetworkError is thrown from the operation.

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None