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 7648466E7 for ; Thu, 4 Aug 2011 07:31:43 +0000 (UTC) Received: (qmail 12455 invoked by uid 500); 4 Aug 2011 07:31:41 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 12213 invoked by uid 500); 4 Aug 2011 07:31:35 -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 12199 invoked by uid 99); 4 Aug 2011 07:31:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 07:31:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jsevellec@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-wy0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 07:31:28 +0000 Received: by wyg8 with SMTP id 8so228420wyg.31 for ; Thu, 04 Aug 2011 00:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=THfjvbUi/AkZFxD3YdXt/Ka3JcEQ+87LVhYPRjBbYtw=; b=EhSyQR0zShgXrmGW2N+bnT2Ux4pTeblCZ1zHi3PE2zBQ49gY4t1uboWsMX3K4y3iMd cqlJAe8DBSTAbJqWkdXkR2FbCN4+LNjNrSBJ0MUKj/JPZ4GVLzfmLZDdb7FtuaS+e/Bp m7btVkYi0BazF4rpGDG/BOaz3pk5dby4440to= MIME-Version: 1.0 Received: by 10.227.11.137 with SMTP id t9mr425098wbt.9.1312443066809; Thu, 04 Aug 2011 00:31:06 -0700 (PDT) Received: by 10.227.197.8 with HTTP; Thu, 4 Aug 2011 00:31:06 -0700 (PDT) Date: Thu, 4 Aug 2011 09:31:06 +0200 Message-ID: Subject: transaction principle between multiple column families From: =?UTF-8?B?SsOpcsOpbXkgU0VWRUxMRUM=?= To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=002215974c9ac8fe5504a9a8f63c --002215974c9ac8fe5504a9a8f63c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi All, Making "transaction" like is my actual preoccupation of the moment. My (simplified) need is : - update data in column family #1 - insert data in column family #2 My need is to see these operations in a single "transaction" because the data is tightly coupled. I use zookeeper/cage to make distributed lock to avoid multiple client inserting or updating on the same data. But there is a problem there is a fail when inserting in column family 2 because i have to "rollback" updated data of the column family #1. My reading on the subject is that to solve the fail : - Can we really consider that "write never fail" with cassandra from the time the execution of a mutation happened on a node. What can be the cause of fail at this point? So is it important to thinking about this potential problem? (yes in my opinion but i'm not totally sure). - Make a retry first. Is there really a chance for the second try to succee= d if the first fail? - keep the "transaction data" to have the possibility to rollback programmatically by deleting the inserting data. The problem is on the updated data to rollback because old values are lost. I read what "Read before write" is a bad idea to save old values before the update. the problem remains, so how to do? Do you have any feedback on this topic? Regards, -- J=C3=A9r=C3=A9my --002215974c9ac8fe5504a9a8f63c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi All,

Maki= ng "transaction" like is my actual preoccupation of the moment.

<= div>My (simplified)= need is :

- update data in column family #1
- insert data in column family #2<= /div>

My need= is to see these operations in a single "transaction" because the= data is tightly coupled.

I use zookeeper/cage to make distributed lock to avoid multiple client = inserting or updating on the same data.

But there is a problem there= is a fail when inserting in column family 2=C2=A0 because i have to "= rollback" updated data of the column family #1.


My reading on the subject is that to solve the fail :
- Can we r= eally consider that "write never fail" with=C2=A0cassandra=C2=A0from the time t= he execution of a mutation happened on a node. What can be the cause of fai= l at this point?
So is it important to thinking about this potential problem? (yes in my opi= nion but i'm not totally sure).
- Make a retry first. Is there reall= y a chance for the second try to succeed if the first fail?
-=C2=A0 keep= the "transaction data" to have the possibility to rollback progr= ammatically by deleting the inserting data. The problem is on the updated d= ata to rollback because old values are lost. I read what "Read before = write" is a bad idea to save old values before the update. the problem= remains, so how to do?


Do you have any feedback on this topic?

Regards,

--J=C3=A9r=C3=A9my

--002215974c9ac8fe5504a9a8f63c--