Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NODE-1797): Error when ChangeStream used as iterator and emitter concurrently #2871

Conversation

W-A-James
Copy link
Contributor

Description

Throw appropriate error when a ChangeStream object is used as both an iterator and an emitter

What changed?

  • src/change_stream.ts
  • test/functional/change_stream.test.js

@W-A-James
Copy link
Contributor Author

WIP as this protection is needed on a number of other methods on ChangeStream

@W-A-James
Copy link
Contributor Author

Working on resolving source of transient failures for change-streams-errors and change-streams-resume-errorLabels spec tests

@W-A-James W-A-James marked this pull request as ready for review July 2, 2021 15:15
@emadum emadum added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jul 2, 2021
Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work here, had some small requests 🙏

src/change_stream.ts Outdated Show resolved Hide resolved
src/change_stream.ts Outdated Show resolved Hide resolved
src/change_stream.ts Show resolved Hide resolved
test/functional/change_stream.test.js Outdated Show resolved Hide resolved
test/functional/change_stream.test.js Outdated Show resolved Hide resolved
@W-A-James W-A-James requested review from nbbeeken and emadum July 7, 2021 19:01
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@nbbeeken nbbeeken removed the request for review from durran July 8, 2021 15:05
@emadum emadum merged commit e0b3afe into 4.0 Jul 9, 2021
@emadum emadum deleted the NODE-1797/4.0/Error-when-change-stream-used-as-iterator-and-emitter-concurrently branch July 9, 2021 17:01
ljhaywar pushed a commit that referenced this pull request Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants