SzyWilliam commented on code in PR #730:
URL: https://github.com/apache/ratis/pull/730#discussion_r956676368


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java:
##########
@@ -1028,6 +1028,37 @@ public boolean checkLeadership() {
     return false;
   }
 
+  /** confirm whether it has valid leadership by broadcasting heartbeat 
AppendEntries */
+  private CompletableFuture<Boolean> confirmLeadership() {
+    ReadRequests.HeartbeatBroadcastListener listener =
+        new 
ReadRequests.HeartbeatBroadcastListener(server.getRaftConf().getCurrentPeers().size());
+
+    senders.stream().forEach(logAppender -> {

Review Comment:
   done



##########
ratis-server/src/main/java/org/apache/ratis/server/leader/LogAppenderBase.java:
##########
@@ -56,6 +61,9 @@ public abstract class LogAppenderBase implements LogAppender {
   private final AwaitForSignal eventAwaitForSignal;
 
   private final AtomicBoolean heartbeatTrigger = new AtomicBoolean();
+  private final List<BiFunction<Boolean, AppendEntriesReplyProto, Boolean>> 
heartbeatAckListeners;

Review Comment:
   done



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