-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-27414 : Use MessageSerializer for TcpDiscoveryClientReconnectMessage v2 #12821
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
Open
Vladsz83
wants to merge
48
commits into
apache:master
Choose a base branch
from
Vladsz83:IGNITE-27414-TcpDiscoveryClientReconnectMessage_v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+367
−81
Open
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
227c3a1
raw
Vladsz83 1e1dd00
fix
Vladsz83 43f4267
fix
Vladsz83 d68b352
fix
Vladsz83 5ac43ab
Merge branch 'master' into Message-serializer-for-TcpDiscoveryNodeAdd…
Vladsz83 1064805
refactoring. + dedicated if
Vladsz83 4adf01a
impl
Vladsz83 330d359
Revert "impl"
Vladsz83 1baa2f2
Revert "refactoring. + dedicated if"
Vladsz83 9067b9b
fix the serialization
Vladsz83 d4e6b2b
fixes
Vladsz83 fb52e0e
fixes
Vladsz83 333185b
fixes
Vladsz83 31a3d29
lost serialization fix
Vladsz83 0a2b97e
Merge branch 'master' into TcpDiscoveryNodeAddedMessage
Vladsz83 7272166
+ master
Vladsz83 31c46d9
minor
Vladsz83 e3e7ae2
impl
Vladsz83 629d051
impl
Vladsz83 7f0cbc3
impl
Vladsz83 cdedd33
fix
Vladsz83 4ce7031
fix
Vladsz83 de7eb5e
minority
Vladsz83 811144a
Merge branch 'master' into IGNITE-27414-TcpDiscoveryClientReconnectMe…
Vladsz83 6e066b9
merged master
Vladsz83 072e46d
Merge branch 'master' into IGNITE-27414-TcpDiscoveryClientReconnectMe…
Vladsz83 6e2ec6e
+ master
Vladsz83 bdb8b96
Merge branch 'master' into IGNITE-27414-TcpDiscoveryClientReconnectMe…
Vladsz83 226df11
- Review fix
Vladsz83 66a1dc1
Revert refactoring
Vladsz83 21cf4ac
Revert refactoring
Vladsz83 e132454
Merge remote-tracking branch 'my/IGNITE-27414-TcpDiscoveryClientRecon…
Vladsz83 13aa4d4
minority
Vladsz83 579d257
reimpl
Vladsz83 f333d9f
+master
Vladsz83 a186f45
minority
Vladsz83 32b0858
Merge branch 'master' into IGNITE-27414-TcpDiscoveryClientReconnectMe…
Vladsz83 e31efee
refactor
Vladsz83 7ea9e34
minor revert
Vladsz83 cc60543
revert TcpDiscoveryJoinRequestMessage finishMarsh
Vladsz83 5aff592
Merge branch 'master' into IGNITE-27414-TcpDiscoveryClientReconnectMe…
Vladsz83 3156dbb
Merge remote-tracking branch 'ignite/master' into IGNITE-27414-TcpDis…
Vladsz83 f9f6f92
+ master, review fixes
Vladsz83 35a3afa
Merge branch 'master' into IGNITE-27414-TcpDiscoveryClientReconnectMe…
Vladsz83 def2b5b
+master
Vladsz83 f30b850
minority
Vladsz83 27a796e
javadoc
Vladsz83 c53f798
trivial
Vladsz83 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -137,6 +137,7 @@ | |
| import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryClientPingRequest; | ||
| import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryClientPingResponse; | ||
| import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryClientReconnectMessage; | ||
| import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryCollectionMessage; | ||
| import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryConnectionCheckMessage; | ||
| import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryCustomEventMessage; | ||
| import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryDiscardMessage; | ||
|
|
@@ -1124,8 +1125,6 @@ private void joinTopology() throws IgniteSpiException { | |
|
|
||
| TcpDiscoveryJoinRequestMessage joinReqMsg = new TcpDiscoveryJoinRequestMessage(locNode, discoveryData); | ||
|
|
||
| joinReqMsg.prepareMarshal(spi.marshaller()); | ||
|
|
||
| joinReqMsg.spanContainer().span( | ||
| tracing.create(TraceableMessagesTable.traceName(joinReqMsg.getClass())) | ||
| .addTag(SpanTags.tag(SpanTags.EVENT_NODE, SpanTags.ID), () -> locNode.id().toString()) | ||
|
|
@@ -2493,8 +2492,6 @@ else if (msg instanceof TcpDiscoveryNodeAddFinishedMessage) { | |
| if (addFinishMsg.clientDiscoData() != null) { | ||
| addFinishMsg = new TcpDiscoveryNodeAddFinishedMessage(addFinishMsg); | ||
|
|
||
| addFinishMsg.prepareMarshal(spi.marshaller()); | ||
|
|
||
| msg = addFinishMsg; | ||
|
|
||
| DiscoveryDataPacket discoData = addFinishMsg.clientDiscoData(); | ||
|
|
@@ -3308,9 +3305,6 @@ private void sendMessageAcrossRing(TcpDiscoveryAbstractMessage msg) { | |
| if (msg instanceof TraceableMessage) | ||
| tracing.messages().beforeSend((TraceableMessage)msg); | ||
|
|
||
| if (msg instanceof TcpDiscoveryJoinRequestMessage) | ||
| ((TcpDiscoveryJoinRequestMessage)msg).prepareMarshal(spi.marshaller()); | ||
|
|
||
| sendMessageToClients(msg); | ||
|
|
||
| List<TcpDiscoveryNode> failedNodes; | ||
|
|
@@ -4144,7 +4138,7 @@ private void processJoinRequestMessage(final TcpDiscoveryJoinRequestMessage msg) | |
| Collection<TcpDiscoveryAbstractMessage> msgs = msgHist.messages(null, node); | ||
|
|
||
| if (msgs != null) { | ||
| reconMsg.pendingMessages(msgs); | ||
| reconMsg.pendingMsgsMsg = new TcpDiscoveryCollectionMessage(msgs); | ||
|
|
||
| reconMsg.success(true); | ||
| } | ||
|
|
@@ -4869,8 +4863,6 @@ private void processNodeAddedMessage(TcpDiscoveryNodeAddedMessage msg) { | |
| addFinishMsg.clientDiscoData(msg.gridDiscoveryData()); | ||
|
|
||
| addFinishMsg.clientNodeAttributes(node.attributes()); | ||
|
|
||
| addFinishMsg.prepareMarshal(spi.marshaller()); | ||
| } | ||
|
|
||
| addFinishMsg = tracing.messages().branch(addFinishMsg, msg); | ||
|
|
@@ -5086,7 +5078,9 @@ else if (spiState == CONNECTING) | |
| joiningNodesDiscoDataList = new ArrayList<>(); | ||
|
|
||
| topHist.clear(); | ||
| topHist.putAll(msg.topologyHistory()); | ||
|
|
||
| if (!F.isEmpty(msg.topologyHistory())) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does behavior changed now? Why we need this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because similar behaviour is in ClientImpl. Should be equal |
||
| topHist.putAll(msg.topologyHistory()); | ||
|
|
||
| pendingMsgs.reset(msg.messages()); | ||
| } | ||
|
|
@@ -6966,8 +6960,6 @@ else if (e.hasCause(ObjectStreamException.class) || | |
| else if (msg instanceof TcpDiscoveryJoinRequestMessage) { | ||
| TcpDiscoveryJoinRequestMessage req = (TcpDiscoveryJoinRequestMessage)msg; | ||
|
|
||
| req.finishUnmarshal(spi.marshaller(), U.resolveClassLoader(spi.ignite().configuration())); | ||
|
|
||
| // Current node holds connection with the node that is joining the cluster. Therefore, it can | ||
| // save certificates with which the connection was established to joining node attributes. | ||
| if (spi.nodeAuth != null && nodeId.equals(req.node().id())) | ||
|
|
@@ -7379,7 +7371,7 @@ private void processClientReconnectMessage(TcpDiscoveryClientReconnectMessage ms | |
|
|
||
| if (pending != null) { | ||
| msg.verifierNodeId(locNodeId); | ||
| msg.pendingMessages(pending); | ||
| msg.pendingMsgsMsg = new TcpDiscoveryCollectionMessage(pending); | ||
| msg.success(true); | ||
|
|
||
| if (log.isDebugEnabled()) { | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Does behavior changed now? Why we need this change?
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.
There is no strict quarantine of not-nullable in messages. Look more reliable