-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement fragmentation of large distribution messages #2133
Merged
garazdawi
merged 13 commits into
erlang:master
from
garazdawi:lukas/erts/fragment-dist-messages
Feb 22, 2019
Merged
Implement fragmentation of large distribution messages #2133
garazdawi
merged 13 commits into
erlang:master
from
garazdawi:lukas/erts/fragment-dist-messages
Feb 22, 2019
+3,944
−1,982
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
All of the Red-Black Tree _yielding functions have been updated to work with reductions returned by the called function instead of yielding on each element.
@garazdawi how will this work for mixed version clusters, e.g. when an OTP 22 node is connected to a 21.2 one? |
The feature is only available if both nodes present the distribution flag indicating that they support fragmented messages. |
ferd
reviewed
Feb 5, 2019
Before this change the inet driver was in list mode and thus the data from it had to be copied when received by the dist entry. This change puts the tcp port in binary mode and makes the any refc binary created by it be used all the way to the process where it is decoded. Thus eliminating one copy of the entire message payload.
The dist messages EXIT, EXIT2 and MONITOR_DOWN have been updated with new versions that send the reason term as part of the payload of the message instead of as part of the control message. This allows the decode of the reason to be done by the receiving process instead of the dist entry which in turn makes it possible for multiple decodes to be done in parallel. This change is done in order to make it easier to fragment the potentially large payload of EXIT, EXIT2 and MONITOR_DOWN into multiple distribution messages. OTP-15611
ccdb9c0
to
f4c121b
Compare
OTP-15612
This commit removed the general send context (which was used very little anyways) and only uses the distributed send context. This will make it easier to use the dist API at the cost of a little bit more code for the local send.
The reason in EXIT and DOWN may be arbitrarily large, so we yield and allow other processes to execute while encoding and sending the signals over the distribution.
3ee8e06
to
c0c6f6b
Compare
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.
This PR implements fragmentation of large Erlang Distribution signals in order to prevent head-of-line blocking. This PR introduces two changes to the
distribution protocol.
The new distribution headers look like this:
The following restrictions exist when using the message fragmentation:
In addition to these changes to the Erlang Distribution protocol, this PR also fixes and optimizes many internal issues.
NOTE: The documentation for the new distribution headers is not done yet.