sijie commented on a change in pull request #1284: Improve FileInfoBackingCache
URL: https://github.com/apache/bookkeeper/pull/1284#discussion_r176520016
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfoBackingCache.java
 ##########
 @@ -92,8 +107,20 @@ private void releaseFileInfo(long ledgerId, CachedFileInfo 
fileInfo) {
     }
 
     void closeAllWithoutFlushing() throws IOException {
-        for (Map.Entry<Long, CachedFileInfo> entry : fileInfos.entrySet()) {
-            entry.getValue().close(false);
+        try {
 
 Review comment:
   I don't think we should change the signature to throw unchecked io 
exception. checked exception is well handled in the whole path, but not 
unchecked exception. 
   
   The logic here is just to getting around this interface doesn't throw 
checked exception, so I am able to throw checked exception. there is no really 
matter it is unchecked execution exception or unchecked io exception.

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