zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2080) ReconfigRecoveryTest fails intermittently
Date Thu, 19 Jan 2017 18:52:26 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-2080:
-------------------------------------------

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

    https://github.com/apache/zookeeper/pull/92#discussion_r96929565
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -434,6 +434,10 @@ public int getQuorumSize(){
         //last proposed quorum verifier
         public QuorumVerifier lastSeenQuorumVerifier = null;
     
    +    // Lock object that guard access to quorumVerifier and lastSeenQuorumVerifier.
    +    private byte[] qvLock = new byte[0];
    --- End diff --
    
    It should be *final* if you want to use it as a lock object. Also, as constant it would
be renamed as *QV_LOCK*.
    
    nit: Also, we usually use a `Object`:
    ```
    private final Object LOCK = new Object();
    ```
    or a `ReentrantReadWriteLock` (more verbose tough, with try-finally, etc).


> ReconfigRecoveryTest fails intermittently
> -----------------------------------------
>
>                 Key: ZOOKEEPER-2080
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2080
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Ted Yu
>            Assignee: Michael Han
>             Fix For: 3.5.3, 3.6.0
>
>         Attachments: jacoco-ZOOKEEPER-2080.unzip-grows-to-70MB.7z, repro-20150816.log,
threaddump.log, ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch,
ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch
>
>
> I got the following test failure on MacBook with trunk code:
> {code}
> Testcase: testCurrentObserverIsParticipantInNewConfig took 93.628 sec
>   FAILED
> waiting for server 2 being up
> junit.framework.AssertionFailedError: waiting for server 2 being up
>   at org.apache.zookeeper.server.quorum.ReconfigRecoveryTest.testCurrentObserverIsParticipantInNewConfig(ReconfigRecoveryTest.java:529)
>   at org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message