szetszwo commented on code in PR #5891:
URL: https://github.com/apache/ozone/pull/5891#discussion_r1440211278


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java:
##########
@@ -186,19 +177,26 @@ public void notifyLeaderChanged(RaftGroupMemberId 
groupMemberId,
    * @param index index which is being updated
    */
   @Override
-  public void notifyTermIndexUpdated(long currentTerm, long index) {
-    // SnapshotInfo should be updated when the term changes.
-    // The index here refers to the log entry index and the index in
-    // SnapshotInfo represents the snapshotIndex i.e. the index of the last
-    // transaction included in the snapshot. Hence, snaphsotInfo#index is not
-    // updated here.
+  public synchronized void notifyTermIndexUpdated(long currentTerm, long 
index) {
+    final TermIndex newTermIndex = TermIndex.valueOf(currentTerm, index);
+    lastNotifiedTermIndex = assertUpdateIncreasingly("lastNotified", 
lastNotifiedTermIndex, newTermIndex);

Review Comment:
   No, leader election  has nothing to do with notified/applied indices.



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