fix(NODE-5106): prevent multiple mongo client connect()s from leaking topology#3596
fix(NODE-5106): prevent multiple mongo client connect()s from leaking topology#3596baileympearson merged 11 commits intomongodb:mainfrom
Conversation
addaleax
left a comment
There was a problem hiding this comment.
This generally seems like the right thing to do, but I think you'll need to add a test for this. Somebody from the team can probably confirm.
You probably don't need all the complexity of the resource_clean_up.test.ts file, I think you could just ensure that e.g. when you call client.connect() twice in the same tick, you'll stil only get one open event on the MongoClient.
|
Yes I clarified in the ticket why I did not add a test. I remain available |
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
|
Hey @nbbeeken, |
… topology (#3596) Co-authored-by: Neal Beeken <neal.beeken@mongodb.com> Co-authored-by: Bailey Pearson <bailey.pearson@mongodb.com>
fix(NODE-5106): Add MongoClient connect lock mechanism to avoid topology leak
Description
Related to the ticket opened here : https://jira.mongodb.org/browse/NODE-5106
As mentionned in the issue, not test provided because atm a test cannot be performed according to the beforeHooks awaiting the MongoClient connect.
Double check the following
npm run check:lintscripttype(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript