Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 99121 invoked from network); 18 Feb 2011 13:23:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2011 13:23:24 -0000 Received: (qmail 70566 invoked by uid 500); 18 Feb 2011 13:23:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 70406 invoked by uid 500); 18 Feb 2011 13:23:19 -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 70397 invoked by uid 99); 18 Feb 2011 13:23:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 13:23:18 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,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 markusklems@gmail.com designates 209.85.218.44 as permitted sender) Received: from [209.85.218.44] (HELO mail-yi0-f44.google.com) (209.85.218.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 13:23:12 +0000 Received: by yie19 with SMTP id 19so1735280yie.31 for ; Fri, 18 Feb 2011 05:22:51 -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:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=PbaoJVbeEwxthtwLmX0QxWrpOaAZcriifr/guyqr23I=; b=EVFLLqWS/Hw5gxZoZx2zhyyNZVwkEOGztozA28jRRlsNII1taNIguBr+p6N7OGOTRK ZVzCbIuzZbmfZAXWWgLkHTDPWtfpFyfZUSKZdNz1Q4ZCUhiFQbE6BnizEYos/BHkOFZA CxpiTFz73a14K/47gG2tLxYZxne4/VORizX0k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=LSLQjwDE2R5+uIK/2oi8YI4ZxHeUXBjVKkcefCdRMKNV1qhgbBtU0xaxbtgQoEMM19 cvzJcY0zR6WIK5cjRXxmUO8mcGKPYVDk2FmaM45+0+h/Dy05+xJ+Ohx5qUOTBKj3N2aa bN9m+mOq7lreKvEG/xvKjCa5J/ERyY+/mKuIA= Received: by 10.150.138.7 with SMTP id l7mr1076411ybd.98.1298035371200; Fri, 18 Feb 2011 05:22:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.203.21 with HTTP; Fri, 18 Feb 2011 05:22:31 -0800 (PST) In-Reply-To: References: <1297991508656-6038330.post@n2.nabble.com> <9f715825-f9bd-6734-fe87-9494463f27c0@me.com> From: Markus Klems Date: Fri, 18 Feb 2011 14:22:31 +0100 Message-ID: Subject: Re: Understand eventually consistent To: user@cassandra.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Related question: Is it a good idea to specify ConsistencyLevels on a per-operation basis? For example: Read ONE Write ALL would deliver consistent read results, just like Read ALL Write ONE. However, if you specify Read ONE Write QUORUM you cannot give such guarantees anymore. Should there be (is there) a programming abstraction on top of ConsistencyLevel that takes care of these things and makes them explicit to the application developer? On Fri, Feb 18, 2011 at 2:04 PM, Anthony John wrote= : > At Quorum - if 2 of 3 nodes are down, a read should not be returned, righ= t ? > But yes - if single node READs are opted for, it will go through. > The original question was - "Why is Cassandra called eventually consisten= t > data store?" > Because at write time, there is not a guarantee that all replicas are > consistent. But they eventually will be! > At Quorum write and Read - you will not get inconsistent results and your > read will force consistency, if such a state has not yet been arrived at = for > the particular piece of data. > But you have the option of or writing and reading at a lower standard, wh= ich > could result in inconsistencies. > HTH, > -JA > On Fri, Feb 18, 2011 at 12:00 AM, Stu Hood wrote: >> >> But, the reason that it isn't safe to say that we are a strongly >> consistent store is that if 2 of your 3 replicas were to die and come ba= ck >> with no data, QUORUM might return the wrong result. >> A requirement of a strongly consistent store is that replicas cannot beg= in >> answering queries until they are consistent: this is not a requirement i= n >> Cassandra, althought arguably should be an option at some point in the >> distant future. >> >> On Thu, Feb 17, 2011 at 5:26 PM, Aaron Morton >> wrote: >>> >>> For background... >>> http://wiki.apache.org/cassandra/ArchitectureOverview >>> (There is a section on consistency in there) >>> For =C2=A0deep background... >>> http://www.allthingsdistributed.com/2008/12/eventually_consistent.html >>> >>> http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp200= 7.pdf >>> In short, yes (for all your questions) if you read and write at Quorum >>> you have consistency=C2=A0behavior for your operations. Even though som= e nodes >>> may have an inconsistent view of the data, e.g. one node is partitioned >>> by a broken network or is overloaded and does not respond. >>> >>> Aaron >>> On 18 Feb, 2011,at 02:11 PM, mcasandra wrote: >>> >>> >>> Why is Cassandra called eventually consistent data store? Wouldn't it b= e >>> consistent if QUORAM is used? >>> >>> Another question is when I specify replication factor of 3 and write wi= th >>> factor of 2 and read with factor of 2 then what happens? >>> >>> 1. When write occurs cassandra will return to the client only when the >>> writes go to commit log on 2 nodes successfully? >>> >>> 2. When read happens cassandra will return only when it is able to read >>> from >>> 2 nodes and determine that it has consistent copy? >>> -- >>> View this message in context: >>> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Unders= tand-eventually-consistent-tp6038330p6038330.html >>> Sent from the cassandra-user@incubator.apache.org mailing list archive = at >>> Nabble.com. >> > >