Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 95090 invoked from network); 30 Nov 2010 16:40:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Nov 2010 16:40:28 -0000 Received: (qmail 41674 invoked by uid 500); 30 Nov 2010 16:40:26 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 41518 invoked by uid 500); 30 Nov 2010 16:40:24 -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 41510 invoked by uid 99); 30 Nov 2010 16:40:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 16:40:23 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 16:40:17 +0000 Received: by wwa36 with SMTP id 36so6245073wwa.25 for ; Tue, 30 Nov 2010 08:39:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.138.82 with SMTP id z18mr7952518wbt.56.1291135190231; Tue, 30 Nov 2010 08:39:50 -0800 (PST) Received: by 10.227.37.38 with HTTP; Tue, 30 Nov 2010 08:39:46 -0800 (PST) In-Reply-To: <330852.66053.qm@web51103.mail.re2.yahoo.com> References: <330852.66053.qm@web51103.mail.re2.yahoo.com> Date: Tue, 30 Nov 2010 08:39:46 -0800 Message-ID: Subject: Re: Achieving isolation on single row modifications with batch_mutate From: Ed Anuff To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016363b972a6032c3049647d673 --0016363b972a6032c3049647d673 Content-Type: text/plain; charset=ISO-8859-1 It's hard to tell without knowing the the nature of the data you're writing, but you might want to think about whether you can embed any sort of version number and/or checksum into the column names of the chunk columns. That way, you could very easily determine that the data you wanted to retrieve was not yet available for reading. Are you able do your partial blob updates on an entire chunk at a time or do you need to read the blob chunk, modify a portion of it, and then write it back? If it's the former, then it might be possible for this to be accomplished without a locking solution. Ed On Sat, Nov 27, 2010 at 8:12 AM, E S wrote: > I'm trying to figure out the best way to achieve single row modification > isolation for readers. > > As an example, I have 2 rows (1,2) with 2 columns (a,b). If I modify both > rows, > I don't care if the user sees the write operations completed on 1 and not > on 2 > for a short time period (seconds). I also don't care if when reading row 1 > the > user gets the new value, and then on a re-read gets the old value (within a > few > seconds). Because of this, I have been planning on using a consistency > level of > one. > > However, if I modify both columns A,B on a single row, I need both changes > on > the row to be visible/invisible atomically. It doesn't matter if they both > become visible and then both invisible as the data propagates across nodes, > but > a half-completed state on an initial read will basically be returning > corrupt > data given my apps consistency requirements. My understanding from the FAQ > that > this single row multicolumn change provides no read isolation, so I will > have > this problem. Is this correct? If so: > > Question 1: Is there a way to get this type of isolation without using a > distributed locking mechanism like cages? > > Question 2: Are there any plans to implement this type of isolation within > Cassandra? > > Question 3: If I went with a distributed locking mechanism, what > consistency > level would I need to use with Cassandra? Could I still get away with a > consistency level of one? It seems that if the initial write is done in a > non-isolated way, but if cross-node row synchronizations are done all or > nothing, I could still use one. > > Question 4: Does anyone know of a good c# alternative to cages/zookeeper? > > Thanks for any help with this! > > > > > --0016363b972a6032c3049647d673 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It's hard to tell without knowing the the nature of the data you're= writing, but you might want to think about whether you can embed any sort = of version number and/or checksum into the column names of the chunk column= s.=A0 That way, you could very easily determine that the data you wanted to= retrieve was not yet available for reading.=A0 Are you able do your partia= l blob updates on an entire chunk at a time or do you need to read the blob= chunk, modify a portion of it, and then write it back?=A0 If it's the = former, then it might be possible for this to be accomplished without a loc= king solution.

Ed

On Sat, Nov 27, 2010 at 8:12 AM, E= S <tr1sklion@y= ahoo.com> wrote:
I'm trying to figure out the best way to achieve single row modificatio= n
isolation for readers.

As an example, I have 2 rows (1,2) with 2 columns (a,b). =A0If I modify bot= h rows,
I don't care if the user sees the write operations completed on 1 and n= ot on 2
for a short time period (seconds). =A0I also don't care if when reading= row 1 the
user gets the new value, and then on a re-read gets the old value (within a= few
seconds). =A0Because of this, I have been planning on using a consistency l= evel of
one.

However, if I modify both columns A,B on a single row, I need both changes = on
the row to be visible/invisible atomically. =A0It doesn't matter if the= y both
become visible and then both invisible as the data propagates across nodes,= but
a half-completed state on an initial read will basically be returning corru= pt
data given my apps consistency requirements. =A0My understanding from the F= AQ that
this single row multicolumn change provides no read isolation, so I will ha= ve
this problem. =A0Is this correct? =A0If so:

Question 1: =A0Is there a way to get this type of isolation without using a=
distributed locking mechanism like cages?

Question 2: =A0Are there any plans to implement this type of isolation with= in
Cassandra?

Question 3: =A0If I went with a distributed locking mechanism, what consist= ency
level would I need to use with Cassandra? =A0Could I still get away with a<= br> consistency level of one? =A0It seems that if the initial write is done in = a
non-isolated way, but if cross-node row synchronizations are done all or nothing, I could still use one.

Question 4: =A0Does anyone know of a good c# alternative to cages/zookeeper= ?

Thanks for any help with this!





--0016363b972a6032c3049647d673--