sashapolo commented on code in PR #1653:
URL: https://github.com/apache/ignite-3/pull/1653#discussion_r1101157640


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/ValidationManager.java:
##########
@@ -146,46 +120,33 @@ ValidationResult validateNode(
     }
 
     boolean isNodeValidated(ClusterNode node) {
-        return storage.isNodeValidated(node.id()) || 
logicalTopology.isNodeInLogicalTopology(node);
-    }
-
-    /**
-     * Checks and removes the node from the list of validated nodes thus 
completing the validation procedure.
-     *
-     * @param node Node that wishes to join the logical topology.
-     */
-    void completeValidation(ClusterNode node) {
-        Future<?> cleanupFuture = cleanupFutures.remove(node.id());
-
-        if (cleanupFuture != null) {
-            cleanupFuture.cancel(false);
-        }
-
-        storage.removeValidatedNode(node.id());
+        return storage.isNodeValidated(node) || 
logicalTopology.isNodeInLogicalTopology(node);
     }
 
-    private void putValidatedNode(ClusterNode node) {
-        storage.putValidatedNode(node.id());
+    void putValidatedNode(ClusterNode node) {
+        storage.putValidatedNode(node);
 
-        scheduleValidatedNodeRemoval(node.id());
+        logicalTopology.onNodeValidated(node);
     }
 
-    private void scheduleValidatedNodeRemoval(String nodeId) {
-        Future<?> future = executor.schedule(() -> {
-            LOG.info("Removing node from the list of validated nodes since no 
JoinReady requests have been received [node={}]", nodeId);
-
-            cleanupFutures.remove(nodeId);
+    void removeValidatedNodes(Collection<ClusterNode> nodes) {
+        Set<ClusterNode> validatedNodes = storage.getValidatedNodes();
 
-            storage.removeValidatedNode(nodeId);
-        }, configuration.incompleteJoinTimeout().value(), 
TimeUnit.MILLISECONDS);
+        nodes.forEach(node -> {
+            if (validatedNodes.contains(node)) {

Review Comment:
   I understand your concern, but how can this happen? How can two nodes have 
two addresses but the same ID? Is this even going to work? 



-- 
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