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


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadOnlyLedgerHandle.java:
##########
@@ -326,11 +326,15 @@ CompletableFuture<Versioned<LedgerMetadata>> 
closeRecovered() {
                     return 
builder.withClosedState().withLastEntryId(lac).withLength(len).build();
                 },
                 this::setLedgerMetadata).run();
-        f.thenRun(() -> {
-                synchronized (metadataLock) {
-                    newEnsemblesFromRecovery.clear();
-                }
-            });
+        f.whenComplete((result, exception) -> {
+            synchronized (metadataLock) {
+                newEnsemblesFromRecovery.clear();
+            }
+            if (exception != null) {
+                LOG.error("When closeRecovered,failed on clearing 
newEnsemblesFromRecovery: {}",
+                        BKException.getExceptionCode(exception));

Review Comment:
   Get exception code is only a number? Why not dumping the whole exception 
(with 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]

Reply via email to