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(ChangeStream): avoid suppressing errors in closed change stream #14206

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #14177

Summary

It looks like the potential bug we mentioned in #12890 was actually correct behavior; MongoDB change streams can emit 'error' events after 'close'. The original reason for this change was to avoid a flakey test, so I think we should just remove the if (ev === 'error' && this.closed) check.

Examples

@vkarpov15 vkarpov15 added this to the 7.6.8 milestone Dec 29, 2023
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

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

Code looks good to me

It looks like the potential bug we mentioned in #12890 was actually correct behavior

i dont quite understand what #12890 has to do with this, from my quick re-skim, it does not mention a potential bug

@vkarpov15
Copy link
Collaborator Author

@hasezoey sorry, I referenced the incorrect PR. Should have referenced #12919:

image

@vkarpov15 vkarpov15 merged commit 94de74f into 7.x Dec 30, 2023
42 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14177 branch December 30, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants