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/07/20 05:51:54 UTC

[GitHub] [pulsar] eolivelli commented on a diff in pull request #15474: [fix][broker] Fix cannot cleanup expired ledger by trim ledgers

eolivelli commented on code in PR #15474:
URL: https://github.com/apache/pulsar/pull/15474#discussion_r925198545


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -1760,7 +1760,9 @@ private void checkConsumedLedgers() {
             if (t instanceof PersistentTopic) {
                 Optional.ofNullable(((PersistentTopic) t).getManagedLedger()).ifPresent(
                         managedLedger -> {
-                            managedLedger.trimConsumedLedgersInBackground(Futures.NULL_PROMISE);
+                            if (!managedLedger.maybeUpdateCursorBeforeTrimmingConsumedLedger()){

Review Comment:
   can we add a comment here please, to explain why we are skipping the execution ?



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