[jira] [Commented] (ZOOKEEPER-1781) ZooKeeper Server fails if snapCount is set to 1
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13789108#comment-13789108 ] Hudson commented on ZOOKEEPER-1781: --- SUCCESS: Integrated in ZooKeeper-trunk #2082 (See [https://builds.apache.org/job/ZooKeeper-trunk/2082/]) ZOOKEEPER-1781. ZooKeeper Server fails if snapCount is set to 1 (Takashi Ohnishi via phunt, breed) (phunt: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1530110) * /zookeeper/trunk/docs/index.pdf * /zookeeper/trunk/docs/javaExample.pdf * /zookeeper/trunk/docs/linkmap.pdf * /zookeeper/trunk/docs/recipes.pdf * /zookeeper/trunk/docs/releasenotes.pdf * /zookeeper/trunk/docs/zookeeperAdmin.html * /zookeeper/trunk/docs/zookeeperAdmin.pdf * /zookeeper/trunk/docs/zookeeperHierarchicalQuorums.pdf * /zookeeper/trunk/docs/zookeeperInternals.pdf * /zookeeper/trunk/docs/zookeeperJMX.pdf * /zookeeper/trunk/docs/zookeeperObservers.pdf * /zookeeper/trunk/docs/zookeeperOver.pdf * /zookeeper/trunk/docs/zookeeperProgrammers.pdf * /zookeeper/trunk/docs/zookeeperQuotas.pdf * /zookeeper/trunk/docs/zookeeperStarted.pdf * /zookeeper/trunk/docs/zookeeperTutorial.pdf ZOOKEEPER-1781. ZooKeeper Server fails if snapCount is set to 1 (Takashi Ohnishi via phunt, breed) (phunt: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1530108) * /zookeeper/trunk/CHANGES.txt * /zookeeper/trunk/docs/zookeeperAdmin.html * /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java * /zookeeper/trunk/src/java/test/org/apache/zookeeper/server/InvalidSnapCountTest.java > ZooKeeper Server fails if snapCount is set to 1 > > > Key: ZOOKEEPER-1781 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1781 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.5 >Reporter: Takashi Ohnishi >Assignee: Takashi Ohnishi >Priority: Minor > Fix For: 3.4.6, 3.5.0 > > Attachments: ZOOKEEPER-1781.patch, ZOOKEEPER-1781.patch > > > If snapCount is set to 1, ZooKeeper Server can start but it fails with the > below error: > 2013-10-02 18:09:07,600 [myid:1] - ERROR > [SyncThread:1:SyncRequestProcessor@151] - Severe unrecoverable error, exiting > java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:300) > at > org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:93) > In source code, it maybe be supposed that snapCount must be 2 or more: > {code:title=org.apache.zookeeper.server.SyncRequestProcessor.java|borderStyle=solid} > 91 // we do this in an attempt to ensure that not all ofthe > servers > 92 // in the ensemble take a snapshot at the same time > 93 int randRoll = r.nextInt(snapCount/2); > {code} > I think this supposition is not bad because snapCount = 1 is not realistic > setting... > But, it may be better to mention this restriction in documentation or add a > validation in the source code. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1781) ZooKeeper Server fails if snapCount is set to 1
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787929#comment-13787929 ] Benjamin Reed commented on ZOOKEEPER-1781: -- +1 good work! > ZooKeeper Server fails if snapCount is set to 1 > > > Key: ZOOKEEPER-1781 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1781 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.5 >Reporter: Takashi Ohnishi >Priority: Minor > Attachments: ZOOKEEPER-1781.patch, ZOOKEEPER-1781.patch > > > If snapCount is set to 1, ZooKeeper Server can start but it fails with the > below error: > 2013-10-02 18:09:07,600 [myid:1] - ERROR > [SyncThread:1:SyncRequestProcessor@151] - Severe unrecoverable error, exiting > java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:300) > at > org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:93) > In source code, it maybe be supposed that snapCount must be 2 or more: > {code:title=org.apache.zookeeper.server.SyncRequestProcessor.java|borderStyle=solid} > 91 // we do this in an attempt to ensure that not all ofthe > servers > 92 // in the ensemble take a snapshot at the same time > 93 int randRoll = r.nextInt(snapCount/2); > {code} > I think this supposition is not bad because snapCount = 1 is not realistic > setting... > But, it may be better to mention this restriction in documentation or add a > validation in the source code. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1781) ZooKeeper Server fails if snapCount is set to 1
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787528#comment-13787528 ] Hadoop QA commented on ZOOKEEPER-1781: -- +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12607062/ZOOKEEPER-1781.patch against trunk revision 1529344. +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/1643//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1643//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1643//console This message is automatically generated. > ZooKeeper Server fails if snapCount is set to 1 > > > Key: ZOOKEEPER-1781 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1781 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.5 >Reporter: Takashi Ohnishi >Priority: Minor > Attachments: ZOOKEEPER-1781.patch, ZOOKEEPER-1781.patch > > > If snapCount is set to 1, ZooKeeper Server can start but it fails with the > below error: > 2013-10-02 18:09:07,600 [myid:1] - ERROR > [SyncThread:1:SyncRequestProcessor@151] - Severe unrecoverable error, exiting > java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:300) > at > org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:93) > In source code, it maybe be supposed that snapCount must be 2 or more: > {code:title=org.apache.zookeeper.server.SyncRequestProcessor.java|borderStyle=solid} > 91 // we do this in an attempt to ensure that not all ofthe > servers > 92 // in the ensemble take a snapshot at the same time > 93 int randRoll = r.nextInt(snapCount/2); > {code} > I think this supposition is not bad because snapCount = 1 is not realistic > setting... > But, it may be better to mention this restriction in documentation or add a > validation in the source code. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1781) ZooKeeper Server fails if snapCount is set to 1
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787524#comment-13787524 ] Takashi Ohnishi commented on ZOOKEEPER-1781: I attached a modified patch which includes a junit test. > ZooKeeper Server fails if snapCount is set to 1 > > > Key: ZOOKEEPER-1781 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1781 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.5 >Reporter: Takashi Ohnishi >Priority: Minor > Attachments: ZOOKEEPER-1781.patch, ZOOKEEPER-1781.patch > > > If snapCount is set to 1, ZooKeeper Server can start but it fails with the > below error: > 2013-10-02 18:09:07,600 [myid:1] - ERROR > [SyncThread:1:SyncRequestProcessor@151] - Severe unrecoverable error, exiting > java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:300) > at > org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:93) > In source code, it maybe be supposed that snapCount must be 2 or more: > {code:title=org.apache.zookeeper.server.SyncRequestProcessor.java|borderStyle=solid} > 91 // we do this in an attempt to ensure that not all ofthe > servers > 92 // in the ensemble take a snapshot at the same time > 93 int randRoll = r.nextInt(snapCount/2); > {code} > I think this supposition is not bad because snapCount = 1 is not realistic > setting... > But, it may be better to mention this restriction in documentation or add a > validation in the source code. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1781) ZooKeeper Server fails if snapCount is set to 1
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787322#comment-13787322 ] Hadoop QA commented on ZOOKEEPER-1781: -- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12606988/ZOOKEEPER-1781.patch against trunk revision 1529344. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1641//console This message is automatically generated. > ZooKeeper Server fails if snapCount is set to 1 > > > Key: ZOOKEEPER-1781 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1781 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.5 >Reporter: Takashi Ohnishi >Priority: Minor > Attachments: ZOOKEEPER-1781.patch > > > If snapCount is set to 1, ZooKeeper Server can start but it fails with the > below error: > 2013-10-02 18:09:07,600 [myid:1] - ERROR > [SyncThread:1:SyncRequestProcessor@151] - Severe unrecoverable error, exiting > java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:300) > at > org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:93) > In source code, it maybe be supposed that snapCount must be 2 or more: > {code:title=org.apache.zookeeper.server.SyncRequestProcessor.java|borderStyle=solid} > 91 // we do this in an attempt to ensure that not all ofthe > servers > 92 // in the ensemble take a snapshot at the same time > 93 int randRoll = r.nextInt(snapCount/2); > {code} > I think this supposition is not bad because snapCount = 1 is not realistic > setting... > But, it may be better to mention this restriction in documentation or add a > validation in the source code. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1781) ZooKeeper Server fails if snapCount is set to 1
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787194#comment-13787194 ] Takashi Ohnishi commented on ZOOKEEPER-1781: I make a patch for ZooKeeper 3.4.5. By reading SyncRequestProcessor.java, I found that a random number between snapCount/2 and snapCount-1 is used. So, I added an explanation about it in the documentation. And I changed the source code to reset snapCount into 2 if it is configured to 1, because snapCount = 1 is meaningless and snapCount = 2 is the minimum for this algorism. > ZooKeeper Server fails if snapCount is set to 1 > > > Key: ZOOKEEPER-1781 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1781 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.5 >Reporter: Takashi Ohnishi >Priority: Minor > Attachments: ZOOKEEPER-1781.patch > > > If snapCount is set to 1, ZooKeeper Server can start but it fails with the > below error: > 2013-10-02 18:09:07,600 [myid:1] - ERROR > [SyncThread:1:SyncRequestProcessor@151] - Severe unrecoverable error, exiting > java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:300) > at > org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:93) > In source code, it maybe be supposed that snapCount must be 2 or more: > {code:title=org.apache.zookeeper.server.SyncRequestProcessor.java|borderStyle=solid} > 91 // we do this in an attempt to ensure that not all ofthe > servers > 92 // in the ensemble take a snapshot at the same time > 93 int randRoll = r.nextInt(snapCount/2); > {code} > I think this supposition is not bad because snapCount = 1 is not realistic > setting... > But, it may be better to mention this restriction in documentation or add a > validation in the source code. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1781) ZooKeeper Server fails if snapCount is set to 1
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13786323#comment-13786323 ] Patrick Hunt commented on ZOOKEEPER-1781: - IMO making it work with snapCount set to 1 would be the best way to resolve this. While it's not realistic for production use it would possibly be interesting for things like testing. > ZooKeeper Server fails if snapCount is set to 1 > > > Key: ZOOKEEPER-1781 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1781 > Project: ZooKeeper > Issue Type: Bug > Components: quorum >Affects Versions: 3.4.5 >Reporter: Takashi Ohnishi >Priority: Minor > > If snapCount is set to 1, ZooKeeper Server can start but it fails with the > below error: > 2013-10-02 18:09:07,600 [myid:1] - ERROR > [SyncThread:1:SyncRequestProcessor@151] - Severe unrecoverable error, exiting > java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:300) > at > org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:93) > In source code, it maybe be supposed that snapCount must be 2 or more: > {code:title=org.apache.zookeeper.server.SyncRequestProcessor.java|borderStyle=solid} > 91 // we do this in an attempt to ensure that not all ofthe > servers > 92 // in the ensemble take a snapshot at the same time > 93 int randRoll = r.nextInt(snapCount/2); > {code} > I think this supposition is not bad because snapCount = 1 is not realistic > setting... > But, it may be better to mention this restriction in documentation or add a > validation in the source code. -- This message was sent by Atlassian JIRA (v6.1#6144)