You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/06 04:52:48 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #15929: [fix] [admin] Enhanced verification for retention policy

codelipenghui commented on code in PR #15929:
URL: https://github.com/apache/pulsar/pull/15929#discussion_r889820621


##########
pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/RetentionPolicies.java:
##########
@@ -28,24 +28,33 @@
  * Infinite retention can be achieved by setting both time and size limits to `-1`.
  */
 public class RetentionPolicies {
-    private int retentionTimeInMinutes;
-    private long retentionSizeInMB;
+
+    public static final int DEFAULT_RETENTION_TIME_IN_MINUTES = 0;
+
+    public static final long DEFAULT_RETENTION_SIZE_IN_MB = 0;
+
+    private Integer retentionTimeInMinutes;
+    private Long retentionSizeInMB;

Review Comment:
   This will introduce a compatibility issue when downgrading to an old version that does not allows 
    `retentionTimeInMinutes` and `retentionSizeInMB` to zero?



-- 
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: commits-unsubscribe@pulsar.apache.org

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