sergey-chugunov-1985 commented on a change in pull request #5711: IGNITE-10748:
remove dead code
URL: https://github.com/apache/ignite/pull/5711#discussion_r253457484
##########
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:
Is it easy to separate each step into a private method? In that case code of
the `safeTcpHandshake` would become self-documented.
----------------------------------------------------------------
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