-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Change Streams
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