You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Michael Han (JIRA)" <ji...@apache.org> on 2017/03/13 16:22:07 UTC

[jira] [Updated] (ZOOKEEPER-1360) QuorumTest.testNoLogBeforeLeaderEstablishment has several problems

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Han updated ZOOKEEPER-1360:
-----------------------------------
    Fix Version/s:     (was: 3.5.3)
                   3.5.4

> QuorumTest.testNoLogBeforeLeaderEstablishment has several problems
> ------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1360
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1360
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 3.4.2
>            Reporter: Henry Robinson
>            Assignee: Henry Robinson
>             Fix For: 3.5.4, 3.6.0
>
>
> After the apparently valid fix to ZOOKEEPER-1294, testNoLogBeforeLeaderEstablishment is failing for me about one time in four. While I'll investigate whether the patch is 1294 is ultimately to blame, reading the test brought to light a number of issues that appear to be bugs or in need of improvement:
> * As part of QuorumTest, an ensemble is already established by the fixture setup code, but apparently unused by the test which uses QuorumUtil. 
> * The test reads QuorumPeer.leader and QuorumPeer.follower without synchronization, which means that writes to those fields may not be published when we come to read them. 
> * The return value of sem.tryAcquire is never checked.
> * The progress of the test is based on ad-hoc timings (25 * 500ms sleeps) and inscrutable numbers of iterations through the main loop (e.g. the semaphore blocking the final asserts is released only after the 20000th of 50000 callbacks)
> * The test as a whole takes ~30s to run
> The first three are easy to fix (as part of fixing the second, I intend to hide all members of QuorumPeer behind getters and setters), the fourth and fifth need a slightly deeper understanding of what the test is trying to achieve.



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