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


##########
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) {

Review Comment:
   what about catching "Throwable" ?



##########
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:
   we shouldn't "completeExceptionally" or "complete" the `closePromise` twice



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