Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F384F38C for ; Mon, 25 Mar 2013 09:27:37 +0000 (UTC) Received: (qmail 72305 invoked by uid 500); 25 Mar 2013 09:27:36 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 71844 invoked by uid 500); 25 Mar 2013 09:27:33 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 71816 invoked by uid 99); 25 Mar 2013 09:27:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 09:27:32 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [193.1.99.77] (HELO gir.skynet.ie) (193.1.99.77) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 09:27:26 +0000 Received: from ip-10-228-174-15.eu-west-1.compute.internal (ec2-54-247-85-211.eu-west-1.compute.amazonaws.com [54.247.85.211]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by gir.skynet.ie (Postfix) with ESMTPSA id 94838123D7 for ; Mon, 25 Mar 2013 09:27:00 +0000 (GMT) Date: Mon, 25 Mar 2013 09:26:42 +0000 From: Ivan Kelly To: user@zookeeper.apache.org Subject: Re: What should I do with SyncDisconnected Message-ID: <20130325092641.GC6908@ip-10-228-174-15.eu-west-1.compute.internal> References: <20130313210140.GD17815@ip-10-228-174-15.eu-west-1.compute.internal> <20130314213002.GA22759@ip-10-228-174-15.eu-west-1.compute.internal> <3DA70000-603D-4D4A-B373-CDD52BA1ADF1@jordanzimmerman.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DA70000-603D-4D4A-B373-CDD52BA1ADF1@jordanzimmerman.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 14, 2013 at 02:43:58PM -0700, Jordan Zimmerman wrote: > > But how long to wait? If the server is truly partitioned from ZK, then > > I'll wait forever, and the client request will be hung forever. > Curator waits for the time specified as the "connection > timeout". Curator introduces three connection states, CONNECTED, > SUSPENDED and LOST. When SysDisconnected is received, Curator sets > the state to SUSPENDED and then issues a sync() in the > background. This sync() does through Curator's normal connection > management, retries, etc. If the sync() doesn't succeed within the > connection timeout, Curator sets the state to LOST. How the > application handles these state changes is, of course, up to the > app. Sorry for the late reply. The connection timeout is defined in curator though? Or is taken from the session timeout? We're doing something like this now. -Ivan