You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "gaozhangmin (via GitHub)" <gi...@apache.org> on 2023/05/09 06:35:43 UTC

[GitHub] [bookkeeper] gaozhangmin commented on a diff in pull request #3948: Optimize getEntryLogMetadata

gaozhangmin commented on code in PR #3948:
URL: https://github.com/apache/bookkeeper/pull/3948#discussion_r1188195829


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/DefaultEntryLogger.java:
##########
@@ -1036,6 +1036,9 @@ public EntryLogMetadata getEntryLogMetadata(long entryLogId, AbstractLogCompacto
         // entry log
         try {
             return extractEntryLogMetadataFromIndex(entryLogId);
+        } catch (FileNotFoundException ex) {

Review Comment:
    If  `FileNotFoundException` is caught,  no need to proceed with the `extractEntryLogMetadataByScanning(entryLogId, throttler)` method call.  save unnecessary call.



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