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

Abort ongoing operations and clean-up active resources upon client.close

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a... node driver user
      I want... ongoing operations aborted on client.close()
      So that... pending resources are cleaned up

      Acceptance Criteria

      • Add an AbortController on the client
      • When the signal aborts, any ongoing operations on the client should reject
        • For each ongoing socket operation, timer, and file read, pass in abort controller that interrupts the promise completion and make the promise reject
        • For file accesses. use the abortable helper so that the wrapped promise rejects
        • Call the abort signal on client close
      • Ensure all calls to socket.destroy() finish before returning client.close()

      Testing Criteria

      • Unit test that upon signal abort:
        • Socket, timer, and file read promises are interrupted and reject 
        • File access promises complete then reject 

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            aditi.khare@mongodb.com Aditi Khare (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None