Change Streams emit multiple close events on resumable errors

XMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a... user of Change Streams
      I want... Change Streams to emit a close event exactly once
      So that... Change Streams have a more intuitive API

      User Experience

      • User will be more easily able to determine when a ChangeStream can no longer be used based on when the close event is emitted

      Dependencies

      • None

      Risks/Unknowns

      • Is there any use-case that emitting the internal cursor's close events currently enables? 

      Acceptance Criteria

      Implementation Requirements

      • Change Stream no longer forwards internal cursor's close events when the ChangeStream needs to be resumed.
      • Change Stream emits close event exactly once at the end of its lifetime indicating it can no longer be used

      Testing Requirements

      • Add integration test verifying that ChangeStreams no longer emit close events when a resumable error is encountered
      • Add integration test verifying that ChangeStreams emit close event exactly once when
        • Change stream is explicitly closed by the user
        • Change stream encounters and un-resumable error

      Documentation Requirements

      • Release notes should cover this

      Follow Up Requirements

      • None

              Assignee:
              Unassigned
              Reporter:
              Warren James (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: