You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/12/02 10:47:56 UTC

[GitHub] [bookkeeper] wenbingshen commented on a diff in pull request #3683: Not wrap IOException twice form checkpoint

wenbingshen commented on code in PR #3683:
URL: https://github.com/apache/bookkeeper/pull/3683#discussion_r1038018258


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java:
##########
@@ -839,6 +839,10 @@ public void checkpoint(Checkpoint checkpoint) throws IOException {
             throw e;
         } catch (RuntimeException e) {
             recordFailedEvent(dbLedgerStorageStats.getFlushStats(), startTime);
+            // not wrap IOException again
+            if (e.getCause() != null && e.getCause() instanceof IOException) {

Review Comment:
   This IOException is wrapped by RuntimeException. not a directly IOException. The first catch block can not caught it.



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

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