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 420539A7C for ; Wed, 14 Mar 2012 07:38:07 +0000 (UTC) Received: (qmail 29434 invoked by uid 500); 14 Mar 2012 07:38:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 29350 invoked by uid 500); 14 Mar 2012 07:38:04 -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 29342 invoked by uid 99); 14 Mar 2012 07:38:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 07:38:04 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a41.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 07:37:58 +0000 Received: from homiemail-a41.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a41.g.dreamhost.com (Postfix) with ESMTP id E983844C05D for ; Wed, 14 Mar 2012 00:37:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=wP+OX1JwIu euPkAByKuSr9G0UR53udOHutBOqvs5ppkfNVKiU+PaZB2Hlyri1pWvD6+r8Xckf5 ZeDUCEl5PRE2sEzw1AH95zsbbD1tY1JYLlDhl4las1wRRfWqZxaMUTC/1SR8e/p+ vVpn37EzM6HgZ64LVqMAyGBpXQOLhup5k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=VET+IBowC5JC1GPj JEoNOxE5/yQ=; b=ubHjfyKk/epDROS3WcYBMmCcpLm+8I8Z3+eGzfDWFX42x/Xy oULCmjAB5K94BmYYSi9RXYhOZptOMKobM0kLSs0Y25ugGPY64lLna7WEC/JHcd2+ 7+6K9gHWX/zuV4uRDnbYyX5RhrX89whD1yTtNeVl2Jr7RP2wcc9leDvxmBU= Received: from [172.16.1.3] (125-236-193-159.adsl.xtra.co.nz [125.236.193.159]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a41.g.dreamhost.com (Postfix) with ESMTPSA id 693EF44C058 for ; Wed, 14 Mar 2012 00:37:35 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/alternative; boundary="Apple-Mail=_C02635AB-4D1B-4C26-9047-6C40187FA92A" Subject: Re: Does the 'batch' order matter ? Date: Wed, 14 Mar 2012 20:37:32 +1300 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_C02635AB-4D1B-4C26-9047-6C40187FA92A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 It may, but it would not be guaranteed. Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 14/03/2012, at 8:11 AM, A J wrote: > I know batch operations are not atomic but does the success of a write > imply all writes preceeding it in the batch were successful ? > > For example, using cql: > BEGIN BATCH USING CONSISTENCY QUORUM AND TTL 8640000 > INSERT INTO users (KEY, password, name) VALUES ('user2', > 'ch@ngem3b', 'second user') > UPDATE users SET password = 'ps22dhds' WHERE KEY = 'user2' > INSERT INTO users (KEY, password) VALUES ('user3', 'ch@ngem3c') > DELETE name FROM users WHERE key = 'user2' > INSERT INTO users (KEY, password, name) VALUES ('user4', > 'ch@ngem3c', 'Andrew') > APPLY BATCH; > > Say the batch failed but I see that the third write was present on a > node. Does it imply that the first insert and the second update > definitely made to that node as well ? > > Thanks. --Apple-Mail=_C02635AB-4D1B-4C26-9047-6C40187FA92A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 It = may, but it would not be guaranteed. =  

Cheers

http://www.thelastpickle.com

On 14/03/2012, at 8:11 AM, A J wrote:

I = know batch operations are not atomic but does the success of a = write
imply all writes preceeding it in the batch were successful = ?

For example, using cql:
BEGIN BATCH USING CONSISTENCY QUORUM = AND TTL 8640000
 INSERT INTO users (KEY, password, name) VALUES = ('user2',
'ch@ngem3b', 'second user')
 UPDATE users SET = password =3D 'ps22dhds' WHERE KEY =3D 'user2'
 INSERT INTO = users (KEY, password) VALUES ('user3', 'ch@ngem3c')
 DELETE = name FROM users WHERE key =3D 'user2'
 INSERT INTO users (KEY, = password, name) VALUES ('user4',
'ch@ngem3c', 'Andrew')
APPLY = BATCH;

Say the batch failed but I see that the third write was = present on a
node. Does it imply that the first insert and the second = update
definitely made to that node as well = ?

Thanks.

= --Apple-Mail=_C02635AB-4D1B-4C26-9047-6C40187FA92A--