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: memory-leak in .transaction() #11259

Merged
merged 3 commits into from Jan 24, 2022
Merged

fix: memory-leak in .transaction() #11259

merged 3 commits into from Jan 24, 2022

Conversation

Uzlopak
Copy link
Collaborator

@Uzlopak Uzlopak commented Jan 24, 2022

@Uzlopak Uzlopak changed the title fix: memory-leak in .tranction() fix: memory-leak in .transaction() Jan 24, 2022
@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Jan 24, 2022

When I apply my patch, the sessions wont leak anymore

~/Workspace/session-leak$ node --inspect main.js 
Debugger listening on ws://127.0.0.1:9229/579962f1-ca8b-4c2d-b279-e1ce54d6dbad
For help, see: https://nodejs.org/en/docs/inspector
2022-01-24T03:21:55.906Z sessions = 0
2022-01-24T03:21:56.925Z sessions = 0
2022-01-24T03:21:57.940Z sessions = 0
2022-01-24T03:21:58.957Z sessions = 0

Also mongodb-team describes it self:

https://www.mongodb.com/blog/post/quick-start-nodejs--mongodb--how-to-implement-transactions

Regardless of what happens, we need to end our session.

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Good catch, thanks 👍

@vkarpov15 vkarpov15 added this to the 6.1.8 milestone Jan 24, 2022
@vkarpov15 vkarpov15 merged commit 734720f into Automattic:master Jan 24, 2022
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.

None yet

2 participants