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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/upgrade/OMPrepareRequest.java:
##########
@@ -185,7 +185,6 @@ private static long waitForLogIndex(long minOMDBFlushIndex,
     // If we purge logs without waiting for this index, it may not make it to
     // the RocksDB snapshot, and then the log entry is lost on this OM.
     long minRatisStateMachineIndex = minOMDBFlushIndex + 1; // for the 
ratis-metadata transaction

Review Comment:
   > ... so there is no need to add 1 to minOMDBFlushIndex?
   
   Yes.
   
   > Can't we just rely on om.getRatisSnapshotIndex() and make sure that the 
given minOMDBFlushIndex is present in the snapshot?
   
   In `OMPrepareRequest.validateAndUpdateCache(..)`, it waits and then takes 
snapshot.  So it should wait for `lastRatisAppliedIndex`.
   



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