mattisonchao commented on code in PR #3662:
URL: https://github.com/apache/bookkeeper/pull/3662#discussion_r1028839615


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/CleanupLedgerManager.java:
##########
@@ -111,7 +114,12 @@ private GenericCallback removeCallback(GenericCallback 
callback) {
 
     private void recordPromise(CompletableFuture<?> promise) {
         futures.add(promise);
-        promise.thenRun(() -> futures.remove(promise));
+        promise.whenComplete((result, exception) -> {
+            futures.remove(promise);
+            if (exception != null) {
+                LOG.error("Failed on operating ledger metadata: {}", 
BKException.getExceptionCode(exception));

Review Comment:
   I'm not sure if we need to log the error message.



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