From cassandra-user-return-1056-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Thu Oct 29 20:39:44 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 9768 invoked from network); 29 Oct 2009 20:39:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Oct 2009 20:39:44 -0000 Received: (qmail 54605 invoked by uid 500); 29 Oct 2009 20:39:43 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 54592 invoked by uid 500); 29 Oct 2009 20:39:43 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 54583 invoked by uid 99); 29 Oct 2009 20:39:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2009 20:39:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of edmond@ooyala.com designates 209.85.222.194 as permitted sender) Received: from [209.85.222.194] (HELO mail-pz0-f194.google.com) (209.85.222.194) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2009 20:39:35 +0000 Received: by pzk32 with SMTP id 32so1523858pzk.21 for ; Thu, 29 Oct 2009 13:39:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.75.16 with SMTP id x16mr56806wfa.155.1256848754132; Thu, 29 Oct 2009 13:39:14 -0700 (PDT) In-Reply-To: References: From: Edmond Lau Date: Thu, 29 Oct 2009 13:38:54 -0700 Message-ID: Subject: Re: can't write with consistency level of one after some nodes fail To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=001636e9144b86c803047718e725 X-Virus-Checked: Checked by ClamAV on apache.org --001636e9144b86c803047718e725 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Oct 29, 2009 at 1:20 PM, Jonathan Ellis wrote: > On Thu, Oct 29, 2009 at 1:18 PM, Edmond Lau wrote: > > I have a freshly started 3-node cluster with a replication factor of > > 2. If I take down two nodes, I can no longer do any writes, even with > > a consistency level of one. I tried on a variety of keys to ensure > > that I'd get at least one where the live node was responsible for one > > of the replicas. I have not yet tried on trunk. On cassandra 0.4.1, > > I get an UnavailableException. > > This sounds like the bug we fixed in CASSANDRA-496 on trunk. > Excellent - thanks. Time to start using trunk. > > > Along the same lines, how does Cassandra handle network partitioning > > where 2 writes for the same keys hit 2 different partitions, neither > > of which are able to form a quorum? Dynamo maintained version vectors > > and put the burden on the client to resolve conflicts, but there's no > > similar interface in the thrift api. > > If you use QUORUM or ALL consistency, neither write will succeed. If > you use ONE, both will, and the one with the higher timestamp will > "win" when the partition heals. > Got it. > > -Jonathan > Edmond --001636e9144b86c803047718e725 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Oct 29, 2009 at 1:20 PM, Jonathan Ellis = <jbellis@gmail.co= m> wrote:
On Thu, Oct 29, 2009 at 1:18 PM, Edmond Lau <edmond@ooyala.com> wrote:
> I have a freshly started 3-node cluster with a replication factor of > 2. =A0If I take down two nodes, I can no longer do any writes, even wi= th
> a consistency level of one. =A0I tried on a variety of keys to ensure<= br> > that I'd get at least one where the live node was responsible for = one
> of the replicas. =A0I have not yet tried on trunk. =A0On cassandra 0.4= .1,
> I get an UnavailableException.

This sounds like the bug we fixed in CASSANDRA-496 on trunk.

Excellent - thanks. =A0Time to start using trunk.
=A0

> Along the same lines, how does Cassandra handle network partitioning > where 2 writes for the same keys hit 2 different partitions, neither > of which are able to form a quorum? =A0Dynamo maintained version vecto= rs
> and put the burden on the client to resolve conflicts, but there's= no
> similar interface in the thrift api.

If you use QUORUM or ALL consistency, neither write will succeed. =A0= If
you use ONE, both will, and the one with the higher timestamp will
"win" when the partition heals.

Got it.
=A0

-Jonathan

Edmond
--001636e9144b86c803047718e725--