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(NODE-4608): prevent parallel monitor checks #3404

Merged
merged 6 commits into from Oct 4, 2022

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Sep 9, 2022

Description

What is changing?

Prevents the Monitor.wake() method from proceeding if the monitor is already in a monitoring state. This PR also unskips the two remaining SDAM tests, as well as removes the socket leak checks in the sdam unified runner.

Is there new documentation needed for these changes?

No.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson force-pushed the NODE-4608-prevent-parallel-monitor-checks branch from e7d4e29 to bcfe1c2 Compare October 3, 2022 14:45
@baileympearson baileympearson force-pushed the NODE-4608-prevent-parallel-monitor-checks branch from e5975d0 to 0ace76c Compare October 3, 2022 14:49
@baileympearson baileympearson marked this pull request as ready for review October 3, 2022 17:20
@@ -328,6 +328,10 @@ function checkServer(monitor: Monitor, callback: Callback<Document | null>) {

function monitorServer(monitor: Monitor) {
return (callback: Callback) => {
if (monitor.s.state === STATE_MONITORING) {
callback();
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to use process.nextTick(callback) here

@nbbeeken nbbeeken added the Team Review Needs review from team label Oct 4, 2022
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

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

LGTM

@nbbeeken nbbeeken merged commit 78bcfe4 into main Oct 4, 2022
@nbbeeken nbbeeken deleted the NODE-4608-prevent-parallel-monitor-checks branch October 4, 2022 14:48
ZLY201 pushed a commit to ZLY201/node-mongodb-native that referenced this pull request Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
3 participants