ArvinDevel 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_r171483174
########## 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: If we want to invalidate the threadLocal cache, then we has 2 ways to implement which was discussed in here(<html>https://stackoverflow.com/questions/2795447/is-there-no-way-to-iterate-over-or-copy-all-the-values-of-a-java-threadlocal</html>). I think invalidating method is complicated than simply closing in fileChannelBackingCache. ---------------------------------------------------------------- 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