poorbarcode commented on code in PR #3562:
URL: https://github.com/apache/bookkeeper/pull/3562#discussion_r1001338409


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java:
##########
@@ -207,10 +207,19 @@ public void safeOperationComplete(int rc, Void result) {
                             if (ex != null) {
                                 LOG.error("Ledger {} close failed", ledgerId, 
ex);
                             }
-                            
openComplete(BKException.Code.UnauthorizedAccessException, null);
+                            openComplete(rc, null);
+                        });
+                    } else if (rc == BKException.Code.TimeoutException) {
+                        closeLedgerHandleAsync().whenComplete((r, ex) -> {
+                            if (ex != null) {
+                                LOG.error("Ledger {} read timeout", ledgerId, 
ex);
+                            }
+                            openComplete(rc, null);
                         });

Review Comment:
   You are right, already fixed



##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java:
##########
@@ -207,10 +207,19 @@ public void safeOperationComplete(int rc, Void result) {
                             if (ex != null) {
                                 LOG.error("Ledger {} close failed", ledgerId, 
ex);
                             }
-                            
openComplete(BKException.Code.UnauthorizedAccessException, null);
+                            openComplete(rc, null);
+                        });
+                    } else if (rc == BKException.Code.TimeoutException) {
+                        closeLedgerHandleAsync().whenComplete((r, ex) -> {
+                            if (ex != null) {
+                                LOG.error("Ledger {} read timeout", ledgerId, 
ex);
+                            }
+                            openComplete(rc, null);
                         });
                     } else {
-                        
openComplete(bk.getReturnRc(BKException.Code.LedgerRecoveryException), null);
+                        closeLedgerHandleAsync().whenComplete((r, ex) -> {
+                            
openComplete(bk.getReturnRc(BKException.Code.LedgerRecoveryException), null);
+                        });
                     }
                 }

Review Comment:
   Already fixed



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