bharatviswa504 commented on a change in pull request #2847:
URL: https://github.com/apache/ozone/pull/2847#discussion_r760687133



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMContext.java
##########
@@ -186,7 +188,9 @@ public long getTermOfLeader() throws NotLeaderException {
 
       if (!isLeader) {
         LOG.warn("getTerm is invoked when not leader.");
-        throw scm.getScmHAManager()
+        StorageContainerManager storageContainerManager =

Review comment:
       So, should we do this only for when it is StorageContainerManager object 
lke above

##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMContext.java
##########
@@ -186,7 +188,9 @@ public long getTermOfLeader() throws NotLeaderException {
 
       if (!isLeader) {
         LOG.warn("getTerm is invoked when not leader.");
-        throw scm.getScmHAManager()
+        StorageContainerManager storageContainerManager =

Review comment:
       Here if it is called from ReconContext it will fail with 
ClassCastException right?




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



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

Reply via email to