Return-Path: Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: (qmail 41801 invoked from network); 21 Oct 2010 00:24:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Oct 2010 00:24:38 -0000 Received: (qmail 51949 invoked by uid 500); 21 Oct 2010 00:24:38 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 51852 invoked by uid 500); 21 Oct 2010 00:24:38 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 51844 invoked by uid 99); 21 Oct 2010 00:24:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Oct 2010 00:24:38 +0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=FH_HELO_EQ_D_D_D_D,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [184.73.217.71] (HELO ip-10-202-7-187.ec2.internal) (184.73.217.71) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Oct 2010 00:24:32 +0000 Received: from ip-10-202-7-187.ec2.internal (localhost [127.0.0.1]) by ip-10-202-7-187.ec2.internal (Postfix) with ESMTP id 054658A204; Thu, 21 Oct 2010 00:24:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: Review Request: Stale reads from ZK can break the atomic CAS operations we have in ZKAssign From: "Jonathan Gray" To: "Todd Lipcon" , stack@duboce.net Date: Thu, 21 Oct 2010 00:24:12 -0000 Message-ID: <20101021002412.11862.71053@ip-10-202-7-187.ec2.internal> Cc: "Jonathan Gray" , jiraposter@review.hbase.org, dev@hbase.apache.org In-Reply-To: <20101020234952.11863.8681@ip-10-202-7-187.ec2.internal> References: <20101020234952.11863.8681@ip-10-202-7-187.ec2.internal> > On 2010-10-20 16:49:52, Todd Lipcon wrote: > > seems OK, but we're adding couple extra ms of latency here on all of th= ese calls. Is that going to be expensive for assigning lots of regions? > > It seems we should be optimistic, and only really need to sync if we se= e unexpected state or the checked put fails? Yeah, gave that a quick shot. It's not easy (the code gets messy quick so = it needs to be well thought out). I'd like to commit this and we can open another jira to deal with the optim= istic approach. - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.cloudera.org/r/1056/#review1590 ----------------------------------------------------------- On 2010-10-20 16:47:05, Jonathan Gray wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://review.cloudera.org/r/1056/ > ----------------------------------------------------------- > = > (Updated 2010-10-20 16:47:05) > = > = > Review request for hbase, Todd Lipcon and stack. > = > = > Summary > ------- > = > Adds a sync(path) operation into ZKW and three calls into it from the CAS= operations in ZKAssign. > = > = > This addresses bug HBASE-3136. > http://issues.apache.org/jira/browse/HBASE-3136 > = > = > Diffs > ----- > = > trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java 102= 5790 = > trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.= java 1025790 = > = > Diff: http://review.cloudera.org/r/1056/diff > = > = > Testing > ------- > = > Still need to test more. I'm not sure it's possible (or feasible in a re= asonable amount of time) to make a unit test for this. We'd probably need = to dig into ZK or mock the hell out of stuff. > = > = > Thanks, > = > Jonathan > = >