|author||Enrico Olivelli <firstname.lastname@example.org>||Mon Jul 27 15:06:29 2020 +0200|
|committer||GitHub <email@example.com>||Mon Jul 27 15:06:29 2020 +0200|
Track ZooKeeper errors as causes of ZKException Descriptions of the changes in this PR: ### Motivation Every time a problem with ZK arises you don't see it in the exception chain of the BKException (in this case ZKException) and you end up with errors like: ``` org.apache.bookkeeper.client.BKException$ZKException: Error while using ZooKeeper at org.apache.bookkeeper.client.SyncCallbackUtils.finish(SyncCallbackUtils.java:83) at org.apache.bookkeeper.client.SyncCallbackUtils$SyncAddCallback.addComplete(SyncCallbackUtils.java:251) at org.apache.bookkeeper.client.AsyncCallback$AddCallback.addCompleteWithLatency(AsyncCallback.java:91) at org.apache.bookkeeper.client.PendingAddOp.submitCallback(PendingAddOp.java:430) at org.apache.bookkeeper.client.LedgerHandle.errorOutPendingAdds(LedgerHandle.java:1784) at org.apache.bookkeeper.client.LedgerHandle$5.safeRun(LedgerHandle.java:574) ``` ### Changes Add a "cause" to every ZKException. ### Notes There are very few places that cannot be fixed because they are still using the old callback based mechanism without CompletableFuture. Those points are not changed in order to make the patch simple but still useful. Reviewers: Jia Zhai <firstname.lastname@example.org> This closes #2384 from eolivelli/fix/zkexception-chain
Apache BookKeeper is a scalable, fault tolerant and low latency storage service optimized for append-only workloads.
It is suitable for being used in following scenarios:
Join us on Slack - This is the most immediate way to connect with Apache BookKeeper committers and contributors.
We feel that a welcoming open community is important and welcome contributions.
See Developer Setup to get your local environment setup.
Make your changes according to our contribution guide.