You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/07/26 15:41:16 UTC

[GitHub] [bookkeeper] wenbingshen commented on a diff in pull request #2942: Fix the infinite waiting for shutdown due to throttler limit

wenbingshen commented on code in PR #2942:
URL: https://github.com/apache/bookkeeper/pull/2942#discussion_r930122528


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -653,6 +653,8 @@ public synchronized void shutdown() throws InterruptedException {
         }
         LOG.info("Shutting down GarbageCollectorThread");
 
+        throttler.cancelledAcquire();
+        compactor.throttler.cancelledAcquire();

Review Comment:
   #2963 introduces another limiter in the GC thread. When the current limit is set very small, it will also cause the GC thread to hang for a long time, so the current limit interrupt logic Move to Throttler.
   
   In this way, where necessary, we can use the `Throttler.cancelledAcquire` method to interrupt the long-term thread sleep caused by current limiting.



-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org