shustsud opened a new pull request #2844:
URL: https://github.com/apache/bookkeeper/pull/2844
### Motivation
For each ledger whose metadata is not in ZK, following stack trace will be
output:
```
15:30:17.925 [GarbageCollectorThread-11-1] ERROR
o.a.b.b.ScanAndCompareGarbageCollector - Exception when iterating through the
ledgers to check for over-replication
java.util.concurrent.ExecutionException:
org.apache.bookkeeper.client.BKException$BKNoSuchLedgerExistsException: No such
ledger exists
at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
at
org.apache.bookkeeper.bookie.ScanAndCompareGarbageCollector.removeOverReplicatedledgers(ScanAndCompareGarbageCollector.java:199)
at
org.apache.bookkeeper.bookie.ScanAndCompareGarbageCollector.gc(ScanAndCompareGarbageCollector.java:120)
at
org.apache.bookkeeper.bookie.GarbageCollectorThread.doGcLedgers(GarbageCollectorThread.java:372)
at
org.apache.bookkeeper.bookie.GarbageCollectorThread.runWithFlags(GarbageCollectorThread.java:323)
at
org.apache.bookkeeper.bookie.GarbageCollectorThread.safeRun(GarbageCollectorThread.java:301)
at
org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by:
org.apache.bookkeeper.client.BKException$BKNoSuchLedgerExistsException: No such
ledger exists
at
org.apache.bookkeeper.meta.AbstractZkLedgerManager$3.processResult(AbstractZkLedgerManager.java:397)
at
org.apache.bookkeeper.zookeeper.ZooKeeperClient$19$1.processResult(ZooKeeperClient.java:994)
at
org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:575)
at
org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:508)
```
It is noisy, makes the size of log files large and finally causes OOM during
log rotation.
So we should suppress the stacktrace.
(This problem is due to
[#2813](https://github.com/apache/bookkeeper/pull/2813).)
### Changes
Add error handling to readLedgerMetadata in over-replicated ledger GC in
order to suppress the stacktrace.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]