Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 32127 invoked from network); 24 Feb 2011 20:21:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Feb 2011 20:21:20 -0000 Received: (qmail 10986 invoked by uid 500); 24 Feb 2011 20:21:18 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 10967 invoked by uid 500); 24 Feb 2011 20:21:18 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 10958 invoked by uid 500); 24 Feb 2011 20:21:17 -0000 Delivered-To: apmail-incubator-cassandra-user@incubator.apache.org Received: (qmail 10955 invoked by uid 99); 24 Feb 2011 20:21:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Feb 2011 20:21:17 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of javier.canillas@gmail.com designates 209.85.213.175 as permitted sender) Received: from [209.85.213.175] (HELO mail-yx0-f175.google.com) (209.85.213.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Feb 2011 20:21:08 +0000 Received: by yxn22 with SMTP id 22so448143yxn.6 for ; Thu, 24 Feb 2011 12:20:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Rk0mm7vXZMYMaZwxmH4sYXIOaK/IzpfJq8P8xqAg7iQ=; b=TlEjg8G71tVzFmoDUqUwzqnXb9Oko491HOzLaEQQBasFUXr9ZNvOGVY3if/UxXt4Y0 ZucXDDWApGGjq2qzhO5nCoGGG7wY0PYjCbXZEsnqjx8WRoYiyfFnwGaiQ9aKO3qK5lUg iQKEAOBk+YHn32PfnbMDMVkowM5FLMU+YvwTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=CGnig7VKFmNWjSWu44Nny4MqNSCt1WOdA1pbLJbKd5Xz7Bmi2fXn+43EbOMrypRvm/ xkXJ6fUIsXfxAnH9Xqk6JMBYwbg3yEcpugANNeHfrF+wuU2GI9SP6N1luQ77XDuRd0KI jTscpbOgmMaKv480l8ExXYaSMD8YOZWF2Zcrc= MIME-Version: 1.0 Received: by 10.236.182.2 with SMTP id n2mr2606166yhm.17.1298578847629; Thu, 24 Feb 2011 12:20:47 -0800 (PST) Received: by 10.236.95.139 with HTTP; Thu, 24 Feb 2011 12:20:47 -0800 (PST) In-Reply-To: <1298578422604-6061772.post@n2.nabble.com> References: <1298254421.8166.29.camel@oxygen> <1298313500550-6049678.post@n2.nabble.com> <1298508175769-6058576.post@n2.nabble.com> <7037359007330560243@unknownmsgid> <1298572164044-6061399.post@n2.nabble.com> <1298575568826-6061593.post@n2.nabble.com> <1298578422604-6061772.post@n2.nabble.com> Date: Thu, 24 Feb 2011 17:20:47 -0300 Message-ID: Subject: Re: Understand eventually consistent From: Javier Canillas To: user@cassandra.apache.org Cc: mcasandra , cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=20cf305b0c10ed0397049d0cf217 X-Virus-Checked: Checked by ClamAV on apache.org --20cf305b0c10ed0397049d0cf217 Content-Type: text/plain; charset=UTF-8 No, since you are intentionally asking that at least a QUORUM of the RFs are written. So in your scenario, only 1 node is up of 3, and QUORUM value is 2. So that operation will fail, no HH is made. A read won't succedd either, since you are asking that the data to be returned must be validated at least by 2 nodes. HH only takes place on write operations and when the OP succeded because the CL can be satisfied and other replicas are down. Then the coordinator uses HH to perform the updates on the failed replicas (as soon as they get up). On Thu, Feb 24, 2011 at 5:13 PM, mcasandra wrote: > > > Javier Canillas wrote: > > > > HH is some kind of write repair, so it has nothing to do with CL that is > a > > requirement of the operation; and it won't be used over reads. > > > > In your example QUORUM is the same as ALL, since you only have 1 RF (only > > the data holder - coordinator). If that node fails, all read / writes > will > > fail. > > > > Now, on another scenario, with RF = 3 and 1 node down: > > > > CL = QUORUM. Will work, but the coordination will mark an HH over the > > write > > and attempt to do it for some time over the failed node. Despite this, > the > > operation will success for the client. > > CL = ALL. Will fail. > > CL = ONE. Will work. 2 HH will be sent to replicas to perform the update. > > > > *Consider CL is the client minimum requirement over an operation to > > succeed*. > > If the cluster can assure that value, then the operation will succeed and > > returned to the client (despite some HH work needs to be done after), if > > not > > an error response will be returned. > > > > > > On Thu, Feb 24, 2011 at 4:26 PM, mcasandra > wrote: > > > >> > >> Does HH count towards QUORUM? Say RF=1 and CL of W=QUORUM and one node > >> that > >> owns the key dies. Would subsequent write operations for that key be > >> successful? I am guessing it will not succeed. > >> -- > >> View this message in context: > >> > http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Understand-eventually-consistent-tp6038330p6061593.html > >> Sent from the cassandra-user@incubator.apache.org mailing list archive > at > >> Nabble.com. > >> > > > > > > Thanks! In above scenario what happens if 2 nodes die and RF=3, CL of > W=QUORUM. Would a write succeed since one write can be made to coordinator > node with HH and other to the replica node that is up. > > And similarly in above scenario would read succeed. Would HH be considered > towards CL in this case? > -- > View this message in context: > http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Understand-eventually-consistent-tp6038330p6061772.html > Sent from the cassandra-user@incubator.apache.org mailing list archive at > Nabble.com. > --20cf305b0c10ed0397049d0cf217 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable No, since you are intentionally asking that at least a QUORUM of the RFs ar= e written. So in your scenario, only 1 node is up of 3, and QUORUM value is= 2. So that operation will fail, no HH is made.

A read w= on't succedd either, since you are asking that the data to be returned = must be validated at least by 2 nodes.

HH only takes place on write operations and when the OP= succeded because the CL can be satisfied and other replicas are down. Then= the coordinator uses HH to perform the updates on the failed replicas (as = soon as they get up).

On Thu, Feb 24, 2011 at 5:13 PM, mcasandra <= span dir=3D"ltr"><mohitanchlia= @gmail.com> wrote:


Javier Canillas wrote:
>
> HH is some kind of write repair, so it has nothing to do with CL that = is a
> requirement of the operation; and it won't be used over reads.
>
> In your example QUORUM is the same as ALL, since you only have 1 RF (o= nly
> the data holder - coordinator). If that node fails, all read / writes = will
> fail.
>
> Now, on another scenario, with RF =3D 3 and 1 node down:
>
> CL =3D QUORUM. Will work, but the coordination will mark an HH over th= e
> write
> and attempt to do it for some time over the failed node. Despite this,= the
> operation will success for the client.
> CL =3D ALL. Will fail.
> CL =3D ONE. Will work. 2 HH will be sent to replicas to perform the up= date.
>
> *Consider CL is the client minimum requirement over an operation to > succeed*.
> If the cluster can assure that value, then the operation will succeed = and
> returned to the client (despite some HH work needs to be done after), = if
> not
> an error response will be returned.
>
>
> On Thu, Feb 24, 2011 at 4:26 PM, mcasandra <mohitanchlia@gmail.com> wrote:
>
>>
>> Does HH count towards QUORUM? Say =C2=A0RF=3D1 and CL of W=3DQUORU= M and one node
>> that
>> owns the key dies. Would subsequent write operations for that key = be
>> successful? I am guessing it will not succeed.
>> --
>> View this message in context:
>> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.co= m/Understand-eventually-consistent-tp6038330p6061593.html
>> Sent from the cassandra-user@incubator.apache.org mailing list archive at
>> Nabble.com.
>>
>
>

Thanks! In above scenario what happens if 2 nodes die and RF=3D= 3, CL of
W=3DQUORUM. Would a write succeed since one write can be made to coordinato= r
node with HH and other to the replica node that is up.

And similarly in above scenario would read succeed. Would HH be considered<= br> towards CL in this case?
--
View this message in context: http://cassandra-user-incubator-apache-org.3= 065146.n2.nabble.com/Understand-eventually-consistent-tp6038330p6061772.htm= l
Sent from the cassandra-user@incubator.apache.org = mailing list archive at Nabble.com.

--20cf305b0c10ed0397049d0cf217--