[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107981#comment-13107981
 ] 

Hadoop QA commented on ZOOKEEPER-1189:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  
http://issues.apache.org/jira/secure/attachment/12495094/ZOOKEEPER-1189.1.patch
  against trunk revision 1172406.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) 
warnings.

    +1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/561//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/561//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/561//console

This message is automatically generated.

> For an invalid snapshot file(less than 10bytes size) RandomAccessFile stream 
> is leaking.
> ----------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1189
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1189
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.3.3
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.3.4, 3.4.0, 3.5.0
>
>         Attachments: ZOOKEEPER-1189.1.patch, ZOOKEEPER-1189.patch
>
>
> When loading the snapshot, ZooKeeper will consider only the 'snapshots with 
> atleast 10 bytes size'. Otherwsie it will ignore and just return without 
> closing the RandomAccessFile.
> {noformat}
> Util.isValidSnapshot() having the following logic. 
>        // Check for a valid snapshot
>         RandomAccessFile raf = new RandomAccessFile(f, "r");
>         // including the header and the last / bytes
>         // the snapshot should be atleast 10 bytes
>         if (raf.length() < 10) {
>             return false;
>         }
> {noformat}
> Since the snapshot file validation logic is outside try block, it won't go to 
> the finally block and will be leaked.
> Suggestion: Move the validation logic to the try/catch block.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to