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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to