eolivelli commented on code in PR #3548:
URL: https://github.com/apache/bookkeeper/pull/3548#discussion_r999253432


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java:
##########
@@ -112,12 +112,10 @@ public void initiate() {
          * Asynchronously read the ledger metadata node.
          */
         bk.getLedgerManager().readLedgerMetadata(ledgerId)
-            .whenComplete((metadata, exception) -> {
-                    if (exception != null) {
-                        openComplete(BKException.getExceptionCode(exception), 
null);
-                    } else {
-                        openWithMetadata(metadata);
-                    }
+                .thenAcceptAsync(this::openWithMetadata, 
bk.getScheduler().chooseThread(ledgerId))
+                .exceptionally(exception -> {
+                    openComplete(BKException.getExceptionCode(exception), 
null);

Review Comment:
   can you please investigate why ?
   it is really strange.
   maybe the test has some problems
   
   maybe we have some mock metadata service that doesn't fail the pending 
operations on close



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

Reply via email to