Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@locus.apache.org Received: (qmail 25400 invoked from network); 7 Jan 2009 17:26:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2009 17:26:49 -0000 Received: (qmail 30781 invoked by uid 500); 7 Jan 2009 17:26:49 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 30768 invoked by uid 500); 7 Jan 2009 17:26:49 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 30757 invoked by uid 99); 7 Jan 2009 17:26:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 09:26:49 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=NO_RDNS_DOTCOM_HELO,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.145.54.173] (HELO mrout3.yahoo.com) (216.145.54.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 17:26:38 +0000 Received: from SP1-EX07CAS02.ds.corp.yahoo.com (sp1-ex07cas02.ds.corp.yahoo.com [216.252.116.138]) by mrout3.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id n07HPmm9016406 for ; Wed, 7 Jan 2009 09:25:48 -0800 (PST) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=received:from:to:date:subject:thread-topic:thread-index: message-id:references:in-reply-to:accept-language: content-language:x-ms-has-attach:x-ms-tnef-correlator:acceptlanguage: content-type:content-transfer-encoding:mime-version; b=jfh4S6uyj/8OVmn7YBpPsQxDUsX8I3e7bstr1sYPD967SrNU6htWXttR33iFvfoJ Received: from SP1-EX07VS02.ds.corp.yahoo.com ([216.252.116.136]) by SP1-EX07CAS02.ds.corp.yahoo.com ([216.252.116.138]) with mapi; Wed, 7 Jan 2009 09:25:48 -0800 From: Benjamin Reed To: "zookeeper-user@hadoop.apache.org" Date: Wed, 7 Jan 2009 09:25:47 -0800 Subject: RE: Sending data during NodeDataChanged or NodeCreated Thread-Topic: Sending data during NodeDataChanged or NodeCreated Thread-Index: AclwYIxr4SXA9xHcR3OdJEAGLZo6TwAi5eUo Message-ID: <6990D2A1CAF07E40A7CFE68A5FAAA15317F9B9B5BF@SP1-EX07VS02.ds.corp.yahoo.com> References: <30c6373b0901061639s700430edj5e879e62e19adec5@mail.gmail.com> In-Reply-To: <30c6373b0901061639s700430edj5e879e62e19adec5@mail.gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org This is the behavior we had when we first implemented the API, and in every= case where people used the information there was a bug. it is virtually im= possible to use correctly. In general I'm all for giving people rope, but i= f it always results in death, you should stop handing it out. In your example, if the ACL changed and then the data changed, we would hav= e a security hole if we sent the data with the watch. ben ________________________________________ From: burtonator@gmail.com [burtonator@gmail.com] On Behalf Of Kevin Burton= [burton@spinn3r.com] Sent: Tuesday, January 06, 2009 4:39 PM To: zookeeper-user@hadoop.apache.org Subject: Sending data during NodeDataChanged or NodeCreated So if I understand this correctly, if I receive a NodeDataChanged event, an= d then attempt do do a read of that node, there's a race condition where the server could crash and I would be disconnected and my read would hit an Exception Or, the ACL could change and I no longer have permission to read the file (though I did for a short window). ..... now I have to add all this logic to retry. Are there any other race conditions I wonder. Why not just send the byte[] data during the NodeDataChanged or NodeCreated event from the server? This would avoid all these issues. It's almost certainly what the user wants anyway. Kevin -- Founder/CEO Spinn3r.com Location: San Francisco, CA AIM/YIM: sfburtonator Skype: burtonator Work: http://spinn3r.com