ibessonov commented on code in PR #7191:
URL: https://github.com/apache/ignite-3/pull/7191#discussion_r2605550381


##########
modules/network/src/main/java/org/apache/ignite/internal/network/netty/ConnectionManager.java:
##########
@@ -525,41 +494,50 @@ public boolean isStopped() {
     private HandshakeManager createInitiatorHandshakeManager(short 
connectionId) {
         InternalClusterNode localNode = 
Objects.requireNonNull(localNodeFuture.getNow(null), "localNode not set");
 
-        if (initiatorHandshakeManagerFactory == null) {
-            return new RecoveryInitiatorHandshakeManager(
-                    localNode,
-                    connectionId,
-                    descriptorProvider,
-                    bootstrapFactory.handshakeEventLoopSwitcher(),
-                    staleIdDetector,
-                    clusterIdSupplier,
-                    this,
-                    stopping::get,
-                    productVersionSource
-            );
-        }
+        return newRecoveryInitiatorHandshakeManager(connectionId, localNode);
+    }
 
-        return initiatorHandshakeManagerFactory.create(
+    /**
+     * Factory method for overriding the handshake manager implementation in 
subclasses.
+     */
+    protected RecoveryInitiatorHandshakeManager 
newRecoveryInitiatorHandshakeManager(
+            short connectionId,
+            InternalClusterNode localNode
+    ) {
+        return new RecoveryInitiatorHandshakeManager(
                 localNode,
                 connectionId,
-                descriptorProvider
+                descriptorProvider,
+                bootstrapFactory.handshakeEventLoopSwitcher(),
+                staleIdDetector,
+                clusterIdSupplier,
+                this,
+                stopping::get,
+                productVersionSource,
+                topologyService,
+                failureProcessor
         );
     }
 
     private HandshakeManager createAcceptorHandshakeManager() {
         // Do not just use localNodeFuture.join() to make sure the wait is 
time-limited.
         waitForLocalNodeToBeSet();
 
+        return newRecoveryAcceptorHandshakeManager(localNodeFuture.join());

Review Comment:
   I agree, I'll change this part



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to