Mitigate MongoDB cursor leak: synchronize next() and close() operations#13786
Merged
italojs merged 15 commits intorelease-3.3.1from Jul 17, 2025
Merged
Mitigate MongoDB cursor leak: synchronize next() and close() operations#13786italojs merged 15 commits intorelease-3.3.1from
italojs merged 15 commits intorelease-3.3.1from
Conversation
✅ Deploy Preview for v3-meteor-api-docs canceled.
|
✅ Deploy Preview for v3-migration-docs canceled.
|
Collaborator
|
Given the severity I think this should be released standalone package patch. |
Member
|
I’d like to run a meteor/performance runtime check to see if the MongoDB driver upgrade starting in version 3.1.1 caused the regression. |
a57cf89 to
01c1845
Compare
Grubba27
reviewed
Jun 23, 2025
Grubba27
reviewed
Jun 23, 2025
radekmie
reviewed
Jun 24, 2025
01c1845 to
e475952
Compare
…ndling and performance
e475952 to
55406e5
Compare
…ation errors are treated as MinimongoError
929b287 to
9fcb2d6
Compare
cdde498 to
2ea8219
Compare
Member
Author
|
@radekmie changes addressed |
Grubba27
reviewed
Jul 7, 2025
Grubba27
reviewed
Jul 7, 2025
Grubba27
reviewed
Jul 7, 2025
acc1f3d to
2ea8219
Compare
nachocodoner
approved these changes
Jul 17, 2025
Grubba27
reviewed
Jul 17, 2025
Co-authored-by: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: branch base is devel because release 3.x must to be updated with devel
Description:
This PR addresses the MongoDB cursor leak issue as reported in issue #13783
Key changes:
AsynchronousCursorto prevent simultaneousnext()andclose()calls, avoiding race conditions.nextoperation is awaited before the cursor is actually closed.These changes help ensure that the killCursor command is sent to the MongoDB server before the session ends, preventing the accumulation of open cursors and improving the reliability of OPLog tailing.