You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2019/07/05 02:53:05 UTC

[GitHub] [bookkeeper] massakam commented on a change in pull request #2121: Issue #2103: Avoid stop of entry log compaction

massakam commented on a change in pull request #2121: Issue #2103: Avoid stop of entry log compaction
URL: https://github.com/apache/bookkeeper/pull/2121#discussion_r300527364
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
 ##########
 @@ -512,10 +512,16 @@ protected void compactEntryLog(EntryLogMetadata entryLogMeta) {
             // indicates that compaction is in progress for this EntryLogId.
             return;
         }
-        // Do the actual compaction
-        compactor.compact(entryLogMeta);
-        // Mark compaction done
-        compacting.set(false);
+
+        try {
+            // Do the actual compaction
+            compactor.compact(entryLogMeta);
+        } catch (Exception e) {
 
 Review comment:
   If we don't catch the exception here, I think that the following for loop is interrupted at that time.
   https://github.com/apache/bookkeeper/blob/b2e099bbc7b13f13825fe78ab009ca132cb3a9ba/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java#L441-L465
   In our case, there is a problem with a particular entry log, so this loop will always stop when `GarbageCollectorThread` try to compact that log. Because of that, I think that the subsequent entry logs are not compacted every time.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services