ivankelly commented on a change in pull request #832: Issue 620: Close the 
fileChannels for read when they are idle
URL: https://github.com/apache/bookkeeper/pull/832#discussion_r171809299
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
 ##########
 @@ -703,7 +716,7 @@ void stop() {
      *          Entry Log File Id
      */
     protected boolean removeEntryLog(long entryLogId) {
-        removeFromChannelsAndClose(entryLogId);
+        fileChannelBackingCache.removeFromChannelsAndClose(entryLogId);
 
 Review comment:
   Shouldn't be 100% necessary, if caching and refcounting is correct. However, 
if caching and refcounting are correct, then noone will be able to get the 
reference, so it is safe to close at that point, so we should do it defensively.
   
   If all is correct, removeFromChannelsAndClose should not be able to find the 
entryLog in the backingcache, so if it does find it, log a warning.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to