From issues-return-1060-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Sep 6 15:44:06 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8F52D180645 for ; Fri, 6 Sep 2019 17:44:06 +0200 (CEST) Received: (qmail 25483 invoked by uid 500); 7 Sep 2019 03:22:05 -0000 Mailing-List: contact issues-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list issues@zookeeper.apache.org Received: (qmail 25338 invoked by uid 99); 7 Sep 2019 03:22:05 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Sep 2019 03:22:05 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9CFB1E314C for ; Fri, 6 Sep 2019 15:44:04 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 9613F782331 for ; Fri, 6 Sep 2019 15:44:02 +0000 (UTC) Date: Fri, 6 Sep 2019 15:44:02 +0000 (UTC) From: "Enrico Olivelli (Jira)" To: issues@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ZOOKEEPER-1360) QuorumTest.testNoLogBeforeLeaderEstablishment has several problems MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ZOOKEEPER-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Enrico Olivelli updated ZOOKEEPER-1360: --------------------------------------- Fix Version/s: 3.5.7 > 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: Abraham Fine > Priority: Major > Fix For: 3.6.0, 3.5.6, 3.5.7 > > > 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 (v8.3.2#803003)