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 2021/12/17 08:48:43 UTC

[GitHub] [bookkeeper] hangc0276 commented on pull request #2942: [BUGFIX] Fix the infinite waiting for shutdown due to throttler limit

hangc0276 commented on pull request #2942:
URL: https://github.com/apache/bookkeeper/pull/2942#issuecomment-996540389


   @wenbingshen Thanks for you enormous contribution.
   The root cause of preventing GarbageCollectorThread shutdown is that the `compacting` flag only control one compact entry phase. 
   https://github.com/apache/bookkeeper/blob/7385d90189b2aa9ae11418a7c1c0fa60e5d0ea25/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java#L558-L579
   
   So, it will wait for one entry log file compact complete before GarbageCollectorThread shutdown. If we throttle the compaction in low throughput, it will take multi minutes to compaction 2GB entry log file.
   
   IMO, we'd better introduce a new compact flag for `AbstractLogCompactor` and check the status on `newScanner.process` method, if the status is false, just throw an IOException, and stop the compact immediately. It can work for both `EntryLogCompactor` and `TransactionalEntryLogCompactor`. 


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