lhotari commented on code in PR #22614:
URL: https://github.com/apache/pulsar/pull/22614#discussion_r1589662256


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -652,6 +652,12 @@ The max allowed delay for delayed delivery (in 
milliseconds). If the broker rece
         )
     private int ttlDurationDefaultInSeconds = 0;
 
+    @FieldContext(
+        category = CATEGORY_POLICIES,
+        doc = "System subscriptions that will be ignored by ttl check. Default 
is empty."

Review Comment:
   "Default is empty" in the description, but there's `__compaction` in the 
default.



##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -652,6 +652,12 @@ The max allowed delay for delayed delivery (in 
milliseconds). If the broker rece
         )
     private int ttlDurationDefaultInSeconds = 0;
 
+    @FieldContext(
+        category = CATEGORY_POLICIES,
+        doc = "System subscriptions that will be ignored by ttl check. Default 
is empty."

Review Comment:
   Please also add changes to the default `broker.conf` and `standalone.conf` 
files if this is something that should be usually configurable by users.



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1933,7 +1936,7 @@ public void checkMessageExpiry() {
         int messageTtlInSeconds = topicPolicies.getMessageTTLInSeconds().get();
         if (messageTtlInSeconds != 0) {
             subscriptions.forEach((__, sub) -> {
-                if (!isCompactionSubscription(sub.getName())) {
+                if (systemCursorNames.contains(sub.getName())) {

Review Comment:
   I think it would be better to always ignore the compaction subscription. It 
could be better to change the meaning of the configurable `systemCursorNames` 
to be additional system cursor names.



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

Reply via email to