valepakh commented on code in PR #5255:
URL: https://github.com/apache/ignite-3/pull/5255#discussion_r1988991483
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterManagementGroupManager.java:
##########
@@ -875,23 +875,23 @@ private void sendClusterState(CmgRaftService raftService,
Collection<ClusterNode
raftService.logicalTopology()
.thenCompose(topology -> {
// Only send the ClusterStateMessage to nodes not already
present in the Logical Topology.
- Collection<ClusterNode> recipients = nodes.stream()
+ Set<ClusterNode> recipients = nodes.stream()
.filter(node -> !topology.nodes().contains(node))
- .collect(toList());
+ .collect(toSet());
if (recipients.isEmpty()) {
return nullCompletedFuture();
}
- Collection<ClusterNode> duplicates =
findDuplicateConsistentIds(topology, nodes);
+ Set<ClusterNode> duplicates =
findDuplicateConsistentIdsOfExistingNodes(topology, recipients);
if (!duplicates.isEmpty()) {
Review Comment:
Removed, added another check which will skip reading cluster state if no
recipients left after sending messages to duplicates.
--
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]