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:
Fixed with
```
Collection<TcpDiscoveryNode> sorted;
if (mdcAwareRing) {
sorted = new TreeSet<>(new MdcAwareNodesComparator());
sorted.addAll(nodes);
}
else
sorted = nodes;
```
--
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]