Github user maoling commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/356#discussion_r137003935
  
    --- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
    @@ -409,13 +409,15 @@ public void truncate(long zxid) throws IOException {
                     try {
                         Files.delete(itr.logFile.toPath());
                     } catch (NoSuchFileException e) {
    +                    LOG.info("An NoSuchFileException was thrown when 
delete file {}" +
    +                    ", but will continue. Assume this file has been 
deleted successfully.", itr.logFile);
                     }
                 }
             } finally {
    -            close(itr);
                 if (raf != null) {
                     raf.close();
    --- End diff --
    
    IMHO, `raf.close();`  should be surrounded with `try-catch` ?


---

Reply via email to