sadanand48 opened a new pull request #3144:
URL: https://github.com/apache/ozone/pull/3144


   ## What changes were proposed in this pull request?
   Current code for #getScmRatisRoles calls SCMRatisServer.getRatisRoles() 
which basically determines the leader based on whether the node is local. 
   `peer.getAddress().concat(isLocal ?
       ":".concat(RaftProtos.RaftPeerRole.LEADER.toString()) :
       ":".concat(RaftProtos.RaftPeerRole.FOLLOWER.toString())) 
   `
   This logic makes sense for other cases since only leader will process this 
request, but not for jmx case. The web ui  of a particularly scm will show 
itself as the leader according to this logic which is incorrect. Using 
scmContext.isLeader() instead to solve this
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-6383
   
   ## How was this patch tested?
   Tested on docker scm ha env
   <img width="1008" alt="Screenshot 2022-03-01 at 12 50 29 AM" 
src="https://user-images.githubusercontent.com/31859223/156045132-406c6f6d-e287-4eff-8afb-19058688670e.png";>
   <img width="1008" alt="Screenshot 2022-03-01 at 12 50 17 AM" 
src="https://user-images.githubusercontent.com/31859223/156045135-c78e4f93-c26a-4d2e-9d05-089e0ca88f4f.png";>
   
   
   


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