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 2021/07/20 12:01:26 UTC

[GitHub] [pulsar] 315157973 commented on a change in pull request #11389: Invalidate the read handle after all cursors consumed.

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



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -2410,7 +2410,7 @@ void internalTrimLedgers(boolean isTruncate, CompletableFuture<?> promise) {
                     if (log.isDebugEnabled()) {
                         log.debug("[{}] Ledger {} not deleted. Neither expired nor over-quota", name, ls.getLedgerId());
                     }
-                    break;
+                    invalidateReadHandle(ls.getLedgerId());

Review comment:
       Should we break the loop after invalidate ReadHandle? Looks different from the current behavior
   If Ledger is not expired or each the quota,  do we also need to close the handle?

##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -2410,7 +2410,7 @@ void internalTrimLedgers(boolean isTruncate, CompletableFuture<?> promise) {
                     if (log.isDebugEnabled()) {
                         log.debug("[{}] Ledger {} not deleted. Neither expired nor over-quota", name, ls.getLedgerId());
                     }
-                    break;
+                    invalidateReadHandle(ls.getLedgerId());

Review comment:
       Should we break the loop after invalidate ReadHandle? Looks different from the current behavior
   If Ledger is not expired or each the quota,  do we also need to close the handle?

##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -2410,7 +2410,7 @@ void internalTrimLedgers(boolean isTruncate, CompletableFuture<?> promise) {
                     if (log.isDebugEnabled()) {
                         log.debug("[{}] Ledger {} not deleted. Neither expired nor over-quota", name, ls.getLedgerId());
                     }
-                    break;
+                    invalidateReadHandle(ls.getLedgerId());

Review comment:
       Should we break the loop after invalidate ReadHandle? Looks different from the current behavior
   




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