zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2316) comment does not match code logic
Date Tue, 25 Apr 2017 18:05:04 GMT

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

Hadoop QA commented on ZOOKEEPER-2316:
--------------------------------------

+1 overall.  GitHub Pull Request  Build
      

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

    +0 tests included.  The patch appears to be a documentation patch that doesn't require
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 3.0.1) 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-github-pr-build/630//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/630//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/630//console

This message is automatically generated.

> comment does not match code logic
> ---------------------------------
>
>                 Key: ZOOKEEPER-2316
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2316
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.1
>            Reporter: sunhaitao
>            Priority: Trivial
>             Fix For: 3.5.1
>
>
> when i read the code below, the comment is put in an incorrect,place.
> " // in order to be committed, a proposal must be accepted by a quorum "
> should be place on top of :
>    if (!p.hasAllQuorums()) {
>            return false;                 
>         }
> ---------------------------------------------------------------------------------------
         
> 3.5.1 Leader code  
> // getting a quorum from all necessary configurations
>         if (!p.hasAllQuorums()) {
>            return false;                 
>         }
>         
>         // commit proposals in order
>         if (zxid != lastCommitted+1) {    
>            LOG.warn("Commiting zxid 0x" + Long.toHexString(zxid)
>                     + " from " + followerAddr + " not first!");
>             LOG.warn("First is "
>                     + (lastCommitted+1));
>         }     
>         
>         // in order to be committed, a proposal must be accepted by a quorum        
     
>         
>         outstandingProposals.remove(zxid);
>         



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message