Skip to content

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

Merged
merged 17 commits into from
Mar 10, 2020
Merged

refactor(db)!: suppress Db events #2251

merged 17 commits into from
Mar 10, 2020

Conversation

emadum
Copy link
Contributor

@emadum emadum commented Mar 5, 2020

Description

NODE-1709 - Stop emitting topology events from Db
NODE-2484 - Fix double close event

What changed?

The Db class no longer inherits EventEmitter, and MongoClient no longer forwards topology events to Db objects. Some event handlers in the unit tests were updated to reflect this, and a deprecated unifiedTopology: false test was removed.

Are there any files to ignore?

@emadum emadum requested review from mbroadst and reggi March 5, 2020 15:11
Copy link
Contributor

@reggi reggi left a 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.

@emadum emadum requested a review from mbroadst March 9, 2020 14:19
Copy link
Member

@mbroadst mbroadst left a 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

@emadum emadum requested a review from mbroadst March 9, 2020 19:10
Copy link
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants