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 2018/03/01 10:53:52 UTC

[GitHub] ivankelly commented on a change in pull request #832: Issue 620: Close the fileChannels for read when they are idle

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_r171522852
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
 ##########
 @@ -1361,25 +1401,20 @@ public void shutdown() {
         // since logChannel is buffered channel, do flush when shutting down
         LOG.info("Stopping EntryLogger");
         try {
+            //close corresponding fileChannels for read
+            fileChannelBackingCache.closeAllFileChannels();
 
 Review comment:
   it doesn't add much complexity. You just need to create a concurrent list of some sort, and when initialValue is called, add the cache to the list before you return it. The threads in bookkeeper live for the lifetime of the process, so you don't need to worry about removing the caches from the list (otherwise a per thread cache would be pointless).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services