-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor(db)!: suppress Db events #2251
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some obvious searches for different event methods, db.on
and db.emit
, etc, nothing comes up. My only fear is that we may be using a method still somewhere const something = client.db(...
then something.emit
, but it seems that shouldn't be happening anywhere.
This looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one final request. Sorry for the scope creep on this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
NODE-1709 - Stop emitting topology events from
Db
NODE-2484 - Fix double close event
What changed?
The
Db
class no longer inheritsEventEmitter
, andMongoClient
no longer forwards topology events toDb
objects. Some event handlers in the unit tests were updated to reflect this, and a deprecatedunifiedTopology: false
test was removed.Are there any files to ignore?