rdhabalia opened a new pull request #1937: [bk-gc] Fix GC thread gets blocked URL: https://github.com/apache/bookkeeper/pull/1937 ### Motivation Recently, we have seen that most of the bookies in cluster had issue with GC-thread that gets blocked while fetching list of ledger znodes while performing GC. because of that GC was not running on the bookies for a long time and it accumulated large number of entry-loggers on the disk. ``` Thread 3363: (state = BLOCKED) - java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise) - java.lang.Object.wait() @bci=2, line=502 (Compiled frame) - org.apache.bookkeeper.util.ZkUtils.getChildrenInSingleNode(org.apache.zookeeper.ZooKeeper, java.lang.String) @bci=34, line=243 (Compiled frame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator.getChildrenAt(java.lang.String) @bci=8, line=165 (Compiled fr ame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator$LeafIterator.<init>(org.apache.bookkeeper.meta.LongHierarchic alLedgerManager$LongHierarchicalLedgerRangeIterator, java.lang.String) @bci=11, line=187 (Compiled frame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator$InnerIterator.advance() @bci=137, line=261 (Compiled frame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator$InnerIterator.next() @bci=28, line=281 (Compiled frame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator$InnerIterator.next() @bci=4, line=278 (Compiled frame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator$InnerIterator.next() @bci=4, line=278 (Compiled frame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator$InnerIterator.next() @bci=4, line=278 (Compiled frame) - org.apache.bookkeeper.meta.LongHierarchicalLedgerManager$LongHierarchicalLedgerRangeIterator.next() @bci=8, line=304 (Compiled frame) - org.apache.bookkeeper.meta.HierarchicalLedgerManager$HierarchicalLedgerRangeIterator.next() @bci=26, line=117 (Compiled frame) - org.apache.bookkeeper.bookie.ScanAndCompareGarbageCollector.gc(org.apache.bookkeeper.bookie.GarbageCollector$GarbageCleaner) @bci=195, line=168 (Compiled frame) - org.apache.bookkeeper.bookie.GarbageCollectorThread.doGcLedgers() @bci=8, line=393 (Compiled frame) - org.apache.bookkeeper.bookie.GarbageCollectorThread.runWithFlags(boolean, boolean, boolean) @bci=39, line=355 (Compiled frame) - org.apache.bookkeeper.bookie.GarbageCollectorThread.safeRun() @bci=28, line=333 (Compiled frame) - org.apache.bookkeeper.common.util.SafeRunnable.run() @bci=1, line=36 (Compiled frame) - java.util.concurrent.Executors$RunnableAdapter.call() @bci=4, line=511 (Compiled frame) - java.util.concurrent.FutureTask.runAndReset() @bci=47, line=308 (Compiled frame) - java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask) @bci=1, line=180 (Compiled frame) - java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run() @bci=37, line=294 (Compiled frame) - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Compiled frame) - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) - io.netty.util.concurrent.FastThreadLocalRunnable.run() @bci=4, line=30 (Interpreted frame) - java.lang.Thread.run() @bci=11, line=748 (Interpreted frame) ``` ### Changes add time-out to zk operation to avoid GC thread blocking.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
