ChenSammi commented on code in PR #7722:
URL: https://github.com/apache/ozone/pull/7722#discussion_r1967431213
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java:
##########
@@ -162,6 +167,10 @@ public void notifyLeaderChanged(RaftGroupMemberId
groupMemberId,
// Initialize OMHAMetrics
ozoneManager.omHAMetricsInit(newLeaderId.toString());
LOG.info("{}: leader changed to {}", groupMemberId, newLeaderId);
+ // if the node is leader (can be ready or not ready, need update index)
+ if (ozoneManager.getOmRatisServer().checkLeaderStatus() !=
OzoneManagerRatisServer.RaftServerStatus.NOT_LEADER) {
+ indexGenerator.onLeaderChange();
Review Comment:
As every OM has its IndexGenerator, which works independently, could you
explain a little bit here, what the onLeaderChange actually do?
--
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]