vldpyatkov commented on a change in pull request #399:
URL: https://github.com/apache/ignite-3/pull/399#discussion_r736416553



##########
File path: modules/raft/src/main/java/org/apache/ignite/internal/raft/Loza.java
##########
@@ -120,32 +126,35 @@ public Loza(ClusterService clusterNetSvc, Path dataPath) {
      * @param groupId Raft group id.
      * @param nodes Raft group nodes.
      * @param lsnrSupplier Raft group listener supplier.
-     * @param clientTimeout Client retry timeout.
-     * @param networkTimeout Client network timeout.
      * @return Future representing pending completion of the operation.
      */
     @Experimental
     public CompletableFuture<RaftGroupService> prepareRaftGroup(
         String groupId,
         List<ClusterNode> nodes,
-        Supplier<RaftGroupListener> lsnrSupplier,
-        int clientTimeout,
-        int networkTimeout) {
+        Supplier<RaftGroupListener> lsnrSupplier
+    ) {
         assert !nodes.isEmpty();
 
         List<Peer> peers = nodes.stream().map(n -> new 
Peer(n.address())).collect(Collectors.toList());
 
         String locNodeName = 
clusterNetSvc.topologyService().localMember().name();
 
-        if (nodes.stream().anyMatch(n -> locNodeName.equals(n.name())))
-            raftServer.startRaftGroup(groupId, lsnrSupplier.get(), peers);
+        boolean hasLocalRaft = nodes.stream().anyMatch(n -> 
locNodeName.equals(n.name()));
+
+        if (hasLocalRaft && !localGroups.contains(groupId)) {
+            if (raftServer.startRaftGroup(groupId, lsnrSupplier.get(), peers))
+                localGroups.add(groupId);
+            else
+                LOG.error("Failed to start raft group on the node [node={}, 
raftGrp={}]", locNodeName, groupId);

Review comment:
       It will through exception here.




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