You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/07/26 10:48:20 UTC

[GitHub] [bookkeeper] hangc0276 commented on a diff in pull request #2913: Make sure the LedgerHandle close callback can be completed when encounter exception

hangc0276 commented on code in PR #2913:
URL: https://github.com/apache/bookkeeper/pull/2913#discussion_r929814016


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java:
##########
@@ -571,7 +571,11 @@ public void safeRun() {
 
                 // error out all pending adds during closing, the callbacks shouldn't be
                 // running under any bk locks.
-                errorOutPendingAdds(rc, pendingAdds);
+                try {
+                    errorOutPendingAdds(rc, pendingAdds);
+                } catch (Exception e) {
+                    closePromise.completeExceptionally(e);

Review Comment:
   Yes, it still needs the following operations. Catch this exception just to ensure the closePromise can complete.



-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org