bshashikant commented on a change in pull request #1784:
URL: https://github.com/apache/ozone/pull/1784#discussion_r561796389



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMContext.java
##########
@@ -117,9 +122,13 @@ public boolean isLeader() {
    * @return term
    * @throws NotLeaderException if isLeader is false
    */
-  public long getTerm() throws NotLeaderException {
+  public long getTermOfLeader() throws NotLeaderException {
     lock.readLock().lock();
     try {
+      if (term == INVALID_TERM) {

Review comment:
       Is this check required??




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to