You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/11/26 00:59:22 UTC

[GitHub] [incubator-ratis] bharatviswa504 commented on a change in pull request #300: RATIS-1180. Expose RaftServer status with Status Info

bharatviswa504 commented on a change in pull request #300:
URL: https://github.com/apache/incubator-ratis/pull/300#discussion_r530714897



##########
File path: ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
##########
@@ -593,6 +593,30 @@ public boolean isLeaderReady() {
     return true;
   }
 
+  /**
+   * Return status of the RaftServer.
+   * @return LeaderStatus
+   */
+  public ServerStatus getServerStatus() {

Review comment:
       There is a slight difference, isLeaderReady will return false when it is leader but not ready, this method helps in finding that.
   
   isLeaderReady -> True when leader and ready
                             -> false when not leader
                             -> false when leader and not ready
   
   This API can help can let the caller know exactly the server status.




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

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