eolivelli commented on a change in pull request #1949: [bookie-gc] add option 
to cache entry-log metadata map into rocksDB
URL: https://github.com/apache/bookkeeper/pull/1949#discussion_r370489732
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
 ##########
 @@ -547,11 +585,14 @@ protected void compactEntryLog(EntryLogMetadata 
entryLogMeta) {
             LOG.info("Extracting entry log meta from entryLogId: {}", 
entryLogId);
 
             try {
-                // Read through the entry log file and extract the entry log 
meta
+                // Read through the entry log file and extract the entry log
+                // meta
                 EntryLogMetadata entryLogMeta = 
entryLogger.getEntryLogMetadata(entryLogId);
-                removeIfLedgerNotExists(entryLogMeta);
+                removeIfLedgerNotExists(entryLogId, entryLogMeta, false);
                 if (entryLogMeta.isEmpty()) {
                     entryLogger.removeEntryLog(entryLogId);
+                    // remove it from entrylogmetadata-map if it presents into 
map
+                    removeEntryLogRecordSafely(entryLogId);
 
 Review comment:
   Did you ever see this case in production?
   If we do not have a strong motivation O prefer  to leave the code as before 
here

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to