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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]