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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentMessageExpiryMonitor.java:
##########
@@ -81,9 +81,9 @@ public boolean expireMessages(int messageTTLInSeconds) {
         if (expirationCheckInProgressUpdater.compareAndSet(this, FALSE, TRUE)) 
{
             log.info("[{}][{}] Starting message expiry check, ttl= {} 
seconds", topicName, subName,
                     messageTTLInSeconds);
-            if (checkExpiryByLedgerClosureTime(cursor, messageTTLInSeconds)) {
-                return true;
-            }
+            // First filter the entire Ledger reached TTL based on the Ledger 
closing time to avoid client clock skew
+            checkExpiryByLedgerClosureTime(cursor, messageTTLInSeconds);

Review Comment:
   It looks like the returned value is not used by any places. Do we need to 
change it to `void`?



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