You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/09/08 11:27:46 UTC

[GitHub] [ignite-3] AMashenkov commented on a change in pull request #321: IGNITE-15288 Fully implement RaftGroupService

AMashenkov commented on a change in pull request #321:
URL: https://github.com/apache/ignite-3/pull/321#discussion_r704327832



##########
File path: modules/raft/src/main/java/org/apache/ignite/internal/raft/Loza.java
##########
@@ -89,8 +89,9 @@ public Loza(ClusterService clusterNetSvc, Path dataPath) {
 
         String locNodeName = clusterNetSvc.topologyService().localMember().name();
 
-        if (nodes.stream().map(ClusterNode::name).collect(Collectors.toSet()).contains(locNodeName))
+        if (nodes.stream().map(ClusterNode::name).collect(Collectors.toSet()).contains(locNodeName)) {

Review comment:
       Why you need to copy collection just to check for contains?
   ```suggestion
           if (nodes.stream().anyMatch(n -> locNodeName.equals(n.name()))) {
   ```




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org