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

[GitHub] [bookkeeper] wenbingshen commented on a diff in pull request #3940: Improve compaction performance

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


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java:
##########
@@ -943,9 +943,6 @@ public Iterable<Long> getActiveLedgersInRange(long firstLedgerId, long lastLedge
 
     @Override
     public void updateEntriesLocations(Iterable<EntryLocation> locations) throws IOException {
-        // Trigger a flush to have all the entries being compacted in the db storage
-        flush();
-
         entryLocationIndex.updateLocations(locations);

Review Comment:
   > Agree with Hang.
   
   +1 
   
   > > If t3 happens when t2's updated data has been flushed into the entry log file and removed from the write cache, the old entry written in t3 will override the new entry written in t2. When we get the entry (LedgerId = 1, EntryId=1), we will get the old value test-v1.
   > 
   > In this case. We should check if the remaining data's new location is overridden by the client incoming entries.
   
   In this case, we should compare whether the location of the entry in the compression entrylog is consistent with the location in the current EntryLocationIndex?



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