JAkutenshi commented on code in PR #7509:
URL: https://github.com/apache/ignite-3/pull/7509#discussion_r2939951034


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/CmgRaftService.java:
##########
@@ -87,7 +88,7 @@ public CompletableFuture<Boolean> isCurrentNodeLeader() {
         Peer leader = raftService.leader();
 
         if (leader == null) {
-            return raftService.refreshLeader().thenCompose(v -> 
isCurrentNodeLeader());
+            return 
raftService.refreshLeader(RaftCommandRunner.NO_TIMEOUT).thenCompose(v -> 
isCurrentNodeLeader());

Review Comment:
   1. Shouldn't we use `Long.MAX_VALUE` as the new semantics? I know about 
negative values are treated as infinite, but still? Or make `NO_TIMEOUT` as a 
constant equals to `Long.MAX_VALUE` for `RaftCommandExecutor`, WDYT?
   2. Why to borrow recursion in case of explicit waiting for leader due to 
infinite timeout?
   3. This commentary the only, but may be applied to a several the same cases 
below.



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