315157973 commented on a change in pull request #9362:
URL: https://github.com/apache/pulsar/pull/9362#discussion_r567248478



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -2025,7 +2025,7 @@ private boolean shouldTopicBeRetained() {
         long retentionTime = 
TimeUnit.MINUTES.toNanos(retentionPolicies.getRetentionTimeInMinutes());
         // Negative retention time means the topic should be retained 
indefinitely,
         // because its own data has to be retained
-        return retentionTime < 0 || (System.nanoTime() - lastActive) < 
retentionTime;
+        return retentionTime <= 0 || (System.nanoTime() - lastActive) < 
retentionTime;

Review comment:
       OK, the status will like this:
   null: not retained
   = 0: not retained
   <0: retained indefinitely
   > 0: retained as required
   




----------------------------------------------------------------
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:
[email protected]


Reply via email to