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

    • 2
    • Not Needed
    • None
    • 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
    • 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:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: