linyiqun commented on a change in pull request #1467:
URL: https://github.com/apache/hadoop-ozone/pull/1467#discussion_r499965831



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisUpgradeUtils.java
##########
@@ -78,14 +82,26 @@ public static void waitForAllTxnsApplied(
       throw new IOException("Index from Snapshot does not match last applied " 
+
           "Index");
     }
+
+    if (purgeLogsAfter) {
+      CompletableFuture<Long> purgeFuture =
+          impl.getState().getLog().purge(snapshotIndex);
+      try {
+        Long purgeIndex = purgeFuture.get();

Review comment:
       I prefer to have a timeout limitation here, it will wait forever if it 
hasn't finished the purge behavior.
   Can we reuse maxTimeToWaitSeconds as the purge timeout and catch timeout 
exception?
   And then add a corresponding test case for this corner case.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to