anton-vinogradov commented on code in PR #12517:
URL: https://github.com/apache/ignite/pull/12517#discussion_r2721547794


##########
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:
   We should have such swith for every feature in this case :)
   Will it be enough to check system variable inside the 
MdcAwareNodesComparator?



##########
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:
   We should have such swith for every feature in this case :)
   Will it be enough to check the system variable inside the 
MdcAwareNodesComparator?



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