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 8827D106AF for ; Fri, 25 Jul 2014 17:46:48 +0000 (UTC) Received: (qmail 12598 invoked by uid 500); 25 Jul 2014 17:46:44 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 12563 invoked by uid 500); 25 Jul 2014 17:46:44 -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 12553 invoked by uid 99); 25 Jul 2014 17:46:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 17:46:44 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.217.169] (HELO mail-lb0-f169.google.com) (209.85.217.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 17:46:39 +0000 Received: by mail-lb0-f169.google.com with SMTP id s7so3731131lbd.28 for ; Fri, 25 Jul 2014 10:46:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=UVj29DGp6MaT866HaADM9zm+kTYtYtB5rMGH28rLjJ4=; b=FISuqjqAMSDqkb/igQQszvdMhD2oQBb0yBiwUJ8C6uc8UgYWe7hCMsI0Q+/zzSp/i5 WKzQlaCtPJXSyue1w4RjB/wnmDK8SLbCqVUSDx3s+jy+85X+RxWUWBzm8gtTgestljx/ Y+YL+MO98PWOlQ7O9bRfA118Nlyh+6dcT5tX7ZzGvzNWXAc22dAlAnq7OzrgRrB9tm35 QGhyPmldiUx1PZluWGFGXNPoN3AfDcdFmRhl7gR5dL6pyaNVpADbD6cf8AJWdMgDY5RA ee/ie8NSf8MQpCh9TJ5DQWTsthIr4NQ9cQQE3Lr+iRw5ZpK6yRL06ZwbWHlNZegoxpa9 4vMw== X-Gm-Message-State: ALoCoQn7AbzYthxZ+cM1yfWpCc8zheOmC3ctfZjV6FoVArXgEUP+53iL28zrxMkjl6EuT+O+RURZ MIME-Version: 1.0 X-Received: by 10.112.60.5 with SMTP id d5mr17143500lbr.26.1406310377549; Fri, 25 Jul 2014 10:46:17 -0700 (PDT) Received: by 10.112.14.34 with HTTP; Fri, 25 Jul 2014 10:46:17 -0700 (PDT) Date: Fri, 25 Jul 2014 10:46:17 -0700 Message-ID: Subject: Replication factor 2 with immutable data From: Jon Travis To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=e89a8f8397ad7f8b0504ff082664 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f8397ad7f8b0504ff082664 Content-Type: text/plain; charset=UTF-8 I have a couple questions regarding the availability of my data in a RF=2 scenario. - The setup - I am currently storing immutable data in a CF with RF=2 and read_repair_chance = 0.0. There is a lot of data, so bumping up to RF=3 would increase my storage costs quite dramatically. For the most part, I am only adding data to this CF (and nightly, do some deleting). Writes and Reads are both being done with CL = ONE. - The questions - When I write a value, it is written to replicas A and B. If B is down, then A will still acknowledge the write and the write will succeed. Great. Now then, if B comes back up, and before B gets the handoff of the data from A, a client attempts to read the recently-written data. If the client attempts to read the data and it gets routed to replica B, the data will not exist there, and the read will fail, correct? But what I really want is for the read to hit both A and B, and whichever one returns the data then great -- I only need 1 of them to actually acknowledge having it. My questions are: - Is it possible to achieve consistency in this approach? Even if I try at CL=TWO and backoff to CL=ONE in a failure condition, there still seems to be a race where I could hit the replica without the data. - Does a replica 'not having the data' count towards the CL requirements? I.e. replica B responds, "Nope, don't have it" -- I don't want the CL to be satisfied, because the data is either there or it is not. I have not done updates to the data. This feels a bit quorum-ish, where a quorum under RF=3 will ask 3 nodes for the data and return success when 2 have consistent results. It feels strange to be able to write data at RF=2, then with only 1 node being down, not be able to read it ... Thanks, -- Jon --e89a8f8397ad7f8b0504ff082664 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have a couple questions regarding the availability of my= data in a RF=3D2 scenario. =C2=A0

- The setup -=C2=A0
I am currently storing immutable data in a CF with RF=3D2 and read= _repair_chance =3D 0.0. =C2=A0There is a lot of data, so bumping up to RF= =3D3 would increase my storage costs quite dramatically. =C2=A0For the most= part, I am only adding data to this CF (and nightly, do some deleting). = =C2=A0Writes and Reads are both being done with CL =3D ONE.

- The questions -
When I write a value, it is= written to replicas A and B. =C2=A0If B is down, then A will still acknowl= edge the write and the write will succeed. =C2=A0Great.
Now then,= if B comes back up, and before B gets the handoff of the data from A, a cl= ient attempts to read the recently-written data. =C2=A0If the client attemp= ts to read the data and it gets routed to replica B, the data will not exis= t there, and the read will fail, correct?

But what I really want is for the read to hit both A an= d B, and whichever one returns the data then great -- I only need 1 of them= to actually acknowledge having it. =C2=A0

My ques= tions are:
=C2=A0 - Is it possible to achieve consistency in this approach? =C2=A0Even= if I try at CL=3DTWO and backoff to CL=3DONE in a failure condition, there= still seems to be a race where I could hit the replica without the data.
=C2=A0 - Does a replica 'not having the data' count toward= s the CL requirements? =C2=A0I.e. replica B responds, "Nope, don't= have it" -- I don't want the CL to be satisfied, because the data= is either there or it is not. =C2=A0I have not done updates to the data.

This feels a bit quorum-ish, where a quorum under RF=3D= 3 will ask 3 nodes for the data and return success when 2 have consistent r= esults.

It feels strange to be able to write data = at RF=3D2, then with only 1 node being down, not be able to read it ...

Thanks,

-- Jon

<= /div>
--e89a8f8397ad7f8b0504ff082664--