sergey-chugunov-1985 commented on code in PR #12517:
URL: https://github.com/apache/ignite/pull/12517#discussion_r2721448846


##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java:
##########
@@ -506,7 +506,10 @@ public void clear() {
             if (filtered.size() < 2)
                 return null;
 
-            Iterator<TcpDiscoveryNode> iter = filtered.iterator();
+            NavigableSet<TcpDiscoveryNode> sorted = new TreeSet<>(new 
MdcAwareNodesComparator());
+            sorted.addAll(filtered);

Review Comment:
   I agree that having a switch to turn this feature off and fall back to a 
manual management of ring structure is necessary.
   
   There is always a chance that we miss an edge case during testing and a 
critical bug in discovery makes it to production. Having a flag as a way to get 
back to a suboptimal but working implementation is critical in such situation.



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