-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
This file contains 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
baileympearson
force-pushed
the
NODE-4608-prevent-parallel-monitor-checks
branch
from
September 13, 2022 11:58
aab1064
to
df42eb8
Compare
baileympearson
force-pushed
the
NODE-4608-prevent-parallel-monitor-checks
branch
from
September 29, 2022 18:04
f854f5d
to
e7d4e29
Compare
5 tasks
baileympearson
force-pushed
the
NODE-4608-prevent-parallel-monitor-checks
branch
from
October 3, 2022 14:45
e7d4e29
to
bcfe1c2
Compare
baileympearson
force-pushed
the
NODE-4608-prevent-parallel-monitor-checks
branch
from
October 3, 2022 14:49
e5975d0
to
0ace76c
Compare
nbbeeken
reviewed
Oct 3, 2022
src/sdam/monitor.ts
Outdated
@@ -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(); |
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.
We may want to use process.nextTick(callback)
here
nbbeeken
approved these changes
Oct 4, 2022
durran
approved these changes
Oct 4, 2022
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
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.
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
npm run check:lint
script<type>(NODE-xxxx)<!>: <description>