ChenSammi commented on code in PR #7722:
URL: https://github.com/apache/ozone/pull/7722#discussion_r1967438384
##########
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:
Since every OM has its IndexGenerator which works independently, could it be
possible that for the same TermIndex transaction, its index has different value
on different OM? If this happens, what will be the consequence?
--
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]