eolivelli commented on a change in pull request #1809: Change LedgerManager to use CompletableFuture URL: https://github.com/apache/bookkeeper/pull/1809#discussion_r233115253
########## File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java ########## @@ -439,12 +439,22 @@ public BKLedgerIdOverflowException() { * Extract an exception code from an BKException, or use a default if it's another type. */ public static int getExceptionCode(Throwable t, int defaultCode) { - if (t instanceof BKException) { + if (t == null) { + return BKException.Code.OK; + } else if (t instanceof BKException) { return ((BKException) t).getCode(); } else if (t.getCause() != null) { Review comment: not directly related, but I have started working with CompletableFuture in other projects, and I see that dependency on race conditions sometimes CompletableFuture notify CompletionException which wrap the actual exception. Have you ever seen such problems in BK ? is this branch addressing such issue ? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services