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 295276690 for ; Fri, 24 Jun 2011 06:57:07 +0000 (UTC) Received: (qmail 65979 invoked by uid 500); 24 Jun 2011 06:57:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 65224 invoked by uid 500); 24 Jun 2011 06:56:41 -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 64427 invoked by uid 99); 24 Jun 2011 06:56:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 06:56:34 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.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 [204.13.248.74] (HELO mho-02-ewr.mailhop.org) (204.13.248.74) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 06:56:26 +0000 Received: from 67-6-247-165.hlrn.qwest.net ([67.6.247.165] helo=[192.168.0.2]) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72) (envelope-from ) id 1Qa0JB-0000VQ-8N for user@cassandra.apache.org; Fri, 24 Jun 2011 06:56:05 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 67.6.247.165 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19/Rnhec3ilYU8IfpDs9jgQP02jC991uKM= Message-ID: <4E0434FF.2080702@dude.podzone.net> Date: Fri, 24 Jun 2011 00:55:59 -0600 From: AJ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Cassandra ACID Content-Type: multipart/alternative; boundary="------------040601070305030006030201" This is a multi-part message in MIME format. --------------040601070305030006030201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Can any Cassandra contributors/guru's confirm my understanding of Cassandra's degree of support for the ACID properties? I provide official references when known. Please let me know if I missed some good official documentation. *Atomicity* All individual writes are atomic at the row level. So, a batch mutate for one specific key will apply updates to all the columns for that one specific row atomically. If part of the single-key batch update fails, then all of the updates will be reverted since they all pertained to one key/row. Notice, I said 'reverted' not 'rolled back'. Note: atomicity and isolation are related to the topic of transactions but one does not imply the other. Even though row updates are atomic, they are not isolated from other users' updates or reads. Refs: http://wiki.apache.org/cassandra/FAQ#batch_mutate_atomic *Consistency* If you want 100% consistency, use consistency level QUORUM for both reads and writes and EACH_QUORUM in a multi-dc scenario. Refs: http://wiki.apache.org/cassandra/ArchitectureOverview *Isolation* NOTHING is isolated; because there is no transaction support in the first place. This means that two or more clients can update the same row at the same time. Their updates of the same or different columns may be interleaved and leave the row in a state that may not make sense depending on your application. Note: this doesn't mean to say that two updates of the same column will be corrupted, obviously; columns are the smallest atomic unit ('atomic' in the more general thread-safe context). Refs: None that directly address this explicitly and clearly and in one place. *Durability* Updates are made durable by the use of the commit log. No worries here. Refs: Plenty. --------------040601070305030006030201 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Can any Cassandra contributors/guru's confirm my understanding of Cassandra's degree of support for the ACID properties?

I provide official references when known.  Please let me know if I missed some good official documentation.

Atomicity
All individual writes are atomic at the row level.  So, a batch mutate for one specific key will apply updates to all the columns for that one specific row atomically.  If part of the single-key batch update fails, then all of the updates will be reverted since they all pertained to one key/row.  Notice, I said 'reverted' not 'rolled back'.  Note: atomicity and isolation are related to the topic of transactions but one does not imply the other.  Even though row updates are atomic, they are not isolated from other users' updates or reads.   
Refs: http://wiki.apache.org/cassandra/FAQ#batch_mutate_atomic

Consistency
If you want 100% consistency, use consistency level QUORUM for both reads and writes and EACH_QUORUM in a multi-dc scenario. 
Refs: http://wiki.apache.org/cassandra/ArchitectureOverview

Isolation
NOTHING is isolated; because there is no transaction support in the first place.  This means that two or more clients can update the same row at the same time.  Their updates of the same or different columns may be interleaved and leave the row in a state that may not make sense depending on your application.  Note: this doesn't mean to say that two updates of the same column will be corrupted, obviously; columns are the smallest atomic unit ('atomic' in the more general thread-safe context).
Refs: None that directly address this explicitly and clearly and in one place.

Durability
Updates are made durable by the use of the commit log.  No worries here.
Refs: Plenty.
--------------040601070305030006030201--