You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "hangc0276 (via GitHub)" <gi...@apache.org> on 2023/04/10 14:20:29 UTC

[GitHub] [bookkeeper] hangc0276 commented on a diff in pull request #3901: Fix garbage collection blocked by runtime exception

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


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -759,7 +759,7 @@ protected void extractMetaFromEntryLogs() throws EntryLogMetadataMapException {
                 } else {
                     entryLogMetaMap.put(entryLogId, entryLogMeta);
                 }
-            } catch (IOException e) {
+            } catch (IOException | RuntimeException e) {

Review Comment:
   This try-catch code block reads each entry log file's metadata and checks if this entry log file can be deleted.  The RuntimeException will be thrown by the read entry log file's metadata logic. We should block the whole garbage collection thread if one entry log file's metadata read failed. We can skip this entry log file if it is broken.



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