sumitagrawl commented on code in PR #7722:
URL: https://github.com/apache/ozone/pull/7722#discussion_r1975025889


##########
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:
   @ChenSammi I got the problem,
   Since every node generate the index on request execution, so there is a 
possibility of different index value. All nodes should get index from common 
place in this case, will work over this to handle.



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