You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/10/02 07:19:10 UTC

[GitHub] [hadoop-ozone] linyiqun commented on a change in pull request #1467: HDDS-4268. Prepare for Upgrade step should purge the log after waiting for the last txn to be applied.

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



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
##########
@@ -432,7 +443,14 @@ private RaftProperties newRaftProperties(ConfigurationSource conf) {
     final int logPurgeGap = conf.getInt(
         OMConfigKeys.OZONE_OM_RATIS_LOG_PURGE_GAP,
         OMConfigKeys.OZONE_OM_RATIS_LOG_PURGE_GAP_DEFAULT);
-    RaftServerConfigKeys.Log.setPurgeGap(properties, logPurgeGap);
+
+    if (forUpgrade) {
+      LOG.info("Setting purge gap to 1.");
+      RaftServerConfigKeys.Log.setPurgeGap(properties, 1);
+    } else {
+      LOG.info("Setting purge gap to 1000.");

Review comment:
       Nit: purge gap should not hard-coded as 1000 in this log, can you use variable logPurgeGap instead of?




----------------------------------------------------------------
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:
users@infra.apache.org



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