Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-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 375BF914 for ; Sat, 25 Aug 2012 05:53:33 +0000 (UTC) Received: (qmail 51376 invoked by uid 500); 25 Aug 2012 05:53:31 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 50835 invoked by uid 500); 25 Aug 2012 05:53:25 -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 50798 invoked by uid 99); 25 Aug 2012 05:53:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Aug 2012 05:53:23 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of derek@fyrie.net designates 72.14.182.177 as permitted sender) Received: from [72.14.182.177] (HELO sikozu.fyrie.net) (72.14.182.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Aug 2012 05:53:16 +0000 Received: from mail-qc0-f172.google.com ([209.85.216.172]) by sikozu.fyrie.net with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.76) (envelope-from ) id 1T59Il-0008CI-1w for user@cassandra.apache.org; Fri, 24 Aug 2012 23:52:55 -0600 Received: by qcac10 with SMTP id c10so1870795qca.31 for ; Fri, 24 Aug 2012 22:52:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.105.205 with SMTP id u13mr3740260qco.9.1345873969443; Fri, 24 Aug 2012 22:52:49 -0700 (PDT) Received: by 10.49.58.136 with HTTP; Fri, 24 Aug 2012 22:52:49 -0700 (PDT) In-Reply-To: <20120825045509.GA2237@loggly.com> References: <20120825045509.GA2237@loggly.com> Date: Fri, 24 Aug 2012 23:52:49 -0600 Message-ID: Subject: Re: QUORUM writes, QUORUM reads -- and eventual consistency From: Derek Williams To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0022158c0f0ddc730a04c810b33f --0022158c0f0ddc730a04c810b33f Content-Type: text/plain; charset=UTF-8 On Fri, Aug 24, 2012 at 10:55 PM, Philip O'Toole wrote: > But consider this. Say I have a replication factor of 3. I request a > QUORUM write, and it fails because the write only reaches 1 node. Perhaps > there is a temporary partition in my cluster. Now, asynchronously, a > different reader performs a QUORUM read of the same cluster and just before > it issues the read, the partition is resolved. The quorum read is satisfied > by the two nodes that have *not* received the latest write (yet). Doesn't > this mean that the read does not "reflect the most recent write"? I realise > this is very unlikely to happen in practise, but I want to be sure I > understand all this. > Others might disagree, but as long as the view from the second reader remains consistent then I see no problem. If it were to have read the newer data from the 1 node and then afterwards read the old data from the other 2 then there is a consistency problem, but in the example you give the second reader seems to still have a consistent view. Trying to guarantee that all clients will have the same view at all times is working against Cassandra's strengths. Where quorum reads and writes are most important is when consistency is required from the point of view of a single client. This is besides the point that the documentation states that the sum of the nodes written to and read from needs to be greater then the replication factor for the statement to be true. In your example only 1 node was written to, when 2 were required to guarantee consistency. The intent to do a quorum write is not the same as actually doing one. -- Derek Williams --0022158c0f0ddc730a04c810b33f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Aug 24, 2012 at 10:55 PM, Philip O'T= oole <philip@loggly.com> wrote:
But consider this. Say I have a replication factor of 3. I request a QUORUM= write, and it fails because the write only reaches 1 node. Perhaps there i= s a temporary partition in my cluster. Now, asynchronously, a different rea= der performs a QUORUM read of the same cluster and just before it issues th= e read, the partition is resolved. The quorum read is satisfied by the two = nodes that have *not* received the latest write (yet). Doesn't this mea= n that the read does not "reflect the most recent write"? I reali= se this is very unlikely to happen in practise, but I want to be sure I und= erstand all this.

Others might disagree, but as long as the = view from the second reader remains consistent then I see no problem. If it= were to have read the newer data from the 1 node and then afterwards read = the old data from the other 2 then there is a consistency problem, but in t= he example you give the second reader seems to still have a consistent view= . Trying to guarantee that all clients will have the same view at all times= is working against Cassandra's strengths.

Where quorum reads and writes are most important is whe= n consistency is required from the point of view of a single client.
<= div>
This is besides the point that the documentation states = that the sum of the nodes written to and read from needs to be greater then= the replication factor for the statement to be true. In your example only = 1 node was written to, when 2 were required to guarantee consistency. The i= ntent to do a quorum write is not the same as actually doing one.
=C2=A0
--
Derek Williams

--0022158c0f0ddc730a04c810b33f--