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 BBAC99BDE for ; Fri, 10 Feb 2012 00:05:29 +0000 (UTC) Received: (qmail 88351 invoked by uid 500); 10 Feb 2012 00:05:29 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 88279 invoked by uid 500); 10 Feb 2012 00:05:28 -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 88271 invoked by uid 99); 10 Feb 2012 00:05:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2012 00:05:28 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mgius7096@gmail.com designates 209.85.210.170 as permitted sender) Received: from [209.85.210.170] (HELO mail-iy0-f170.google.com) (209.85.210.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2012 00:05:20 +0000 Received: by iakk32 with SMTP id k32so3159561iak.15 for ; Thu, 09 Feb 2012 16:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=DAsJfpJ0v3LLTWNHzOqASwBWC8epPotmNXK8OMaOvys=; b=wBHhjLc7IWwXA5F0eXKX6K1SVK1+EOmt+u6eCeblFA8jOlV0Oht0Wfzdu8fQlmWwOd eea3zyJDgz0Vb2mtVRk9ijSssUc1n8EKq2BeKmibBTbXsyrIEx6h3s3Bajgs+cUOVtrL P6TIiP+lQBA003dvPDHht5jADnI3CcRtVO9qY= MIME-Version: 1.0 Received: by 10.50.236.67 with SMTP id us3mr34529459igc.14.1328832299527; Thu, 09 Feb 2012 16:04:59 -0800 (PST) Received: by 10.231.80.83 with HTTP; Thu, 9 Feb 2012 16:04:59 -0800 (PST) Date: Thu, 9 Feb 2012 16:04:59 -0800 Message-ID: Subject: session expire closes handle? From: Mark Gius To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=14dae9340ba92dec3104b890e1be X-Virus-Checked: Checked by ClamAV on apache.org --14dae9340ba92dec3104b890e1be Content-Type: text/plain; charset=ISO-8859-1 According to http://wiki.apache.org/hadoop/ZooKeeper/FAQ#A3: "SESSION_EXPIRED automatically closes the ZooKeeper handle." What does it mean that the zookeeper handle is closed? I'm assuming this refers to the zookeeper handle that is returned by zookeeper.init. If that is the case, then I'm not seeing this handle being "closed" and then cleaned up. When I perform the following steps: - zookeeper.init - handle is 0 - wait for session to connect - force a session expiration - wait for client to show session expiration At this point I can clearly see that handle 0 cannot be used for any real work. I can use zoo_client_id to get the now expired session id, zookeeper.is_unrecoverable(0) returns INVALIDSTATE, but if I call zookeeper.close(0) the call blocks indefinitely. Calling zookeeper.init to get a new session gives me handle "1". Normally after a successful close(0) the next call to zookeeper.init gives me handle 0 again. Am I doing something wrong here? I feel that I shouldn't have lingering zookeeper handles every time a session expires, but that's seems to be my only option right now. Mark --14dae9340ba92dec3104b890e1be--