RexXiong commented on code in PR #3063:
URL: https://github.com/apache/celeborn/pull/3063#discussion_r1918278638


##########
master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala:
##########
@@ -1478,6 +1484,21 @@ private[celeborn] class Master(
     }
   }
 
+  private def getRatisApplyCompletedIndex: Long = {
+    if (conf.haEnabled) {
+      val ratisServer = 
statusSystem.asInstanceOf[HAMasterMetaManager].getRatisServer
+      if (ratisServer != null) {
+        val stateMachine = ratisServer.getMasterStateMachine
+        val lastAppliedIndex = stateMachine.getLastAppliedTermIndex.getIndex
+        lastAppliedIndex
+      } else {
+        0
+      }
+    } else {
+      0
+    }
+  }
+

Review Comment:
   ```suggestion
     private def getRatisApplyCompletedIndex: Long = {
       if (conf.haEnabled) {
         val ratisServer = 
statusSystem.asInstanceOf[HAMasterMetaManager].getRatisServer
         if (ratisServer != null) {
           ratisServer.getMasterStateMachine.getLastAppliedTermIndex.getIndex
         } 
       }
       0
     }
   
   ```



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