anmolnar commented on code in PR #2178:
URL: https://github.com/apache/zookeeper/pull/2178#discussion_r1733148486


##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java:
##########
@@ -336,7 +337,11 @@ public void parseProperties(Properties zkProp) throws 
IOException, ConfigExcepti
             } else if (key.equals("autopurge.snapRetainCount")) {
                 snapRetainCount = Integer.parseInt(value);
             } else if (key.equals("autopurge.purgeInterval")) {
-                purgeInterval = Integer.parseInt(value);
+                if (Character.isDigit(value.charAt(value.length() - 1))) {
+                    purgeIntervalInMs = Time.parseTimeInterval(value) * 
Time.HOUR; // default is hours for backward compatibility

Review Comment:
   Oh, tricky. I got it now. You're right, default behaviour is not altered.



-- 
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: notifications-unsubscr...@zookeeper.apache.org

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

Reply via email to