Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAF7D116D9 for ; Mon, 28 Jul 2014 19:51:39 +0000 (UTC) Received: (qmail 30032 invoked by uid 500); 28 Jul 2014 19:51:39 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 29990 invoked by uid 500); 28 Jul 2014 19:51:39 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 29978 invoked by uid 99); 28 Jul 2014 19:51:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2014 19:51:39 +0000 Date: Mon, 28 Jul 2014 19:51:39 +0000 (UTC) From: "Jordan Zimmerman (JIRA)" To: dev@curator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (CURATOR-125) ConnectionStateListener is confused by READ_ONLY state 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/CURATOR-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jordan Zimmerman updated CURATOR-125: ------------------------------------- Comment: was deleted (was: Please delete the above 3 comments (and this one) opened a PR with the wrong number.) > ConnectionStateListener is confused by READ_ONLY state > ------------------------------------------------------ > > Key: CURATOR-125 > URL: https://issues.apache.org/jira/browse/CURATOR-125 > Project: Apache Curator > Issue Type: Bug > Components: Client > Affects Versions: 2.6.0 > Environment: Ubuntu 12.04 > 3 ZK with readonlymode.enabled > Reporter: Benjamin Jaton > Attachments: Test.java > > > To reproduce: > - have a 3 nodes ZK ensemble with readonlymode.enabled > - shut down 2 of the 3 ZK servers ( we start in read only mode) > Then create a piece of code (see Test.java attached): > - a curator client (keep the timeout reasonably short) > - a NodeCache listener on '/' > - a separate ZooKeeper client > -> the connection goes into READ_ONLY/ConnectedReadOnly as expected > - start another ZooKeeper > -> the connection goes into SUSPENDED/Disconnected, then CONNECTED/SyncConnected, fine. > - stop one of the 2 ZooKeeper alive > -> the connection goes: > ZOOKEEPER STATE: Disconnected > CURATOR STATE: SUSPENDED > ZOOKEEPER STATE: ConnectedReadOnly > CURATOR STATE: READ_ONLY > CURATOR STATE: SUSPENDED > CURATOR STATE: READ_ONLY > CURATOR STATE: SUSPENDED > CURATOR STATE: READ_ONLY > So it's flaky. Sometimes it doesn't switch back and forth, sometimes twice only, sometimes a lot more. > Depending on the timeout on the client, it might take more time to appear. > I attached a sample code that would reproduce it in 20-30 seconds. > Note that the problem may ultimately be on the ZooKeeper side but at that point I just don't know. -- This message was sent by Atlassian JIRA (v6.2#6252)