-
Notifications
You must be signed in to change notification settings - Fork 29.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
cluster: fix edge cases that throw ERR_INTERNAL_ASSERTION #36764
Closed
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
nodejs-github-bot
added
the
cluster
Issues and PRs related to the cluster subsystem.
label
Jan 4, 2021
aduh95
reviewed
Jan 4, 2021
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.
Shouldn't we use a SafeSet
instead of a SafeMap
?
oyyd
force-pushed
the
cluster-child-index
branch
from
January 10, 2021 11:59
6945f24
to
89c8d53
Compare
aduh95
approved these changes
Jan 11, 2021
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.
Benchmark CI didn't show any perf regressions or improvements
confidence improvement accuracy (*) (**) (***)
cluster/echo.js n=100000 serialization='advanced' sendsPerBroadcast=10 payload='object' workers=1 -2.39 % ±6.11% ±8.13% ±10.58%
cluster/echo.js n=100000 serialization='advanced' sendsPerBroadcast=10 payload='string' workers=1 -1.81 % ±7.25% ±9.65% ±12.57%
cluster/echo.js n=100000 serialization='advanced' sendsPerBroadcast=1 payload='object' workers=1 -6.29 % ±16.92% ±22.52% ±29.32%
cluster/echo.js n=100000 serialization='advanced' sendsPerBroadcast=1 payload='string' workers=1 0.04 % ±7.12% ±9.48% ±12.34%
cluster/echo.js n=100000 serialization='json' sendsPerBroadcast=10 payload='object' workers=1 -8.05 % ±11.64% ±15.52% ±20.29%
cluster/echo.js n=100000 serialization='json' sendsPerBroadcast=10 payload='string' workers=1 10.75 % ±11.97% ±15.99% ±20.92%
cluster/echo.js n=100000 serialization='json' sendsPerBroadcast=1 payload='object' workers=1 -9.79 % ±11.02% ±14.67% ±19.09%
cluster/echo.js n=100000 serialization='json' sendsPerBroadcast=1 payload='string' workers=1 4.68 % ±11.14% ±14.82% ±19.29%
Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case there are 8 comparisons, you can thus
expect the following amount of false-positive results:
0.40 false positives, when considering a 5% risk acceptance (*, **, ***),
0.08 false positives, when considering a 1% risk acceptance (**, ***),
0.01 false positives, when considering a 0.1% risk acceptance (***)
Some cases use both `cluster` and `net`/`cluser` will throw ERR_INTERNAL_ASSERTION when `listen`/`bind` to the port of `0`. This PR maitains a separate map of the index to fix the issue. See the new tests added for the detail cases. PR-URL: nodejs#36764 Reviewed-By: Antoine du Hamel <[email protected]>
aduh95
force-pushed
the
cluster-child-index
branch
from
January 11, 2021 10:27
89c8d53
to
8e3f606
Compare
Landed in 8e3f606 |
danielleadams
pushed a commit
that referenced
this pull request
Jan 12, 2021
Some cases use both `cluster` and `net`/`cluser` will throw ERR_INTERNAL_ASSERTION when `listen`/`bind` to the port of `0`. This PR maitains a separate map of the index to fix the issue. See the new tests added for the detail cases. PR-URL: #36764 Reviewed-By: Antoine du Hamel <[email protected]>
Merged
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.
Some cases use both
cluster
andnet
/cluser
will throwERR_INTERNAL_ASSERTION when
listen
/bind
to the port of0
, like below:would throw:
After some investigation, I believe it's because we remove the
indexesKey
whenclose
servers while it might reference more than oneindex
:node/lib/internal/cluster/child.js
Line 127 in 8b8620d
This PR maitains a separate map of the index to fix the issue.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes