Mmuzaf commented on a change in pull request #5711: IGNITE-10748: remove dead
code
URL: https://github.com/apache/ignite/pull/5711#discussion_r253770054
##########
File path:
modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
##########
@@ -3753,134 +3795,98 @@ else if (log.isDebugEnabled())
else
U.writeFully(ch, ByteBuffer.wrap(U.IGNITE_HEADER));
- ClusterNode locNode = getLocalNode();
-
- if (locNode == null)
- throw new IgniteCheckedException("Local node has not been
started or " +
- "fully initialized [isStopping=" +
getSpiContext().isStopping() + ']');
-
- if (recovery != null) {
- HandshakeMessage msg;
-
- int msgSize = HandshakeMessage.MESSAGE_FULL_SIZE;
-
- if (handshakeConnIdx != null) {
- msg = new HandshakeMessage2(locNode.id(),
- recovery.incrementConnectCount(),
- recovery.received(),
- handshakeConnIdx);
-
- msgSize += 4;
- }
- else {
- msg = new HandshakeMessage(locNode.id(),
- recovery.incrementConnectCount(),
- recovery.received());
- }
-
- if (log.isDebugEnabled())
- log.debug("Writing handshake message [locNodeId=" +
locNode.id() +
- ", rmtNode=" + rmtNodeId + ", msg=" + msg + ']');
+ // Step 2. Prepare Handshake message to send remote node.
Review comment:
Sergey, I've tried to avoid huge changes and focused only on removing not
used code.
In general, I agree with you here - better to have separate methods on each
step of handshaking process, but in fact, this method used only in the signle
flow and single time and we can leave it as it is.
WDYT?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services