From commits-return-75856-apmail-cassandra-commits-archive=cassandra.apache.org@cassandra.apache.org Thu Jun 13 17:27:26 2013 Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4390CC8CD for ; Thu, 13 Jun 2013 17:27:26 +0000 (UTC) Received: (qmail 12376 invoked by uid 500); 13 Jun 2013 17:27:25 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 12181 invoked by uid 500); 13 Jun 2013 17:27:22 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 11894 invoked by uid 99); 13 Jun 2013 17:27:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jun 2013 17:27:20 +0000 Date: Thu, 13 Jun 2013 17:27:20 +0000 (UTC) From: "Aleksey Yeschenko (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-5633) CQL support for updating multiple rows in a partition using CAS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-5633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682450#comment-13682450 ] Aleksey Yeschenko commented on CASSANDRA-5633: ---------------------------------------------- We only support updating several rows using BATCH in cql3, so this would somehow involve BATCH as well. Maybe some new kind of BATCH, CAS BATCH? {noformat} BEGIN CAS BATCH UPDATE foo SET x = 10 WHERE bar = 1 AND baz = 'k' IF x = 9 UPDATE foo SET y = 15 WHERE bar = 1 AND baz = 'y' IF y = 7 DELETE FROM foo WHERE bar = 1 AND baz = 'z' IF NOT EXISTS APPLY BATCH {noformat} We'll validate the partition key is the same (bar) and merge all the conditions together (all the updates, too) and it will only apply if all the conditions are true. Not all statements even have to involve CAS, but at least one should. It's not perfect, just the first thing that came to mind. > CQL support for updating multiple rows in a partition using CAS > --------------------------------------------------------------- > > Key: CASSANDRA-5633 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5633 > Project: Cassandra > Issue Type: Improvement > Affects Versions: 2.0 > Reporter: sankalp kohli > Priority: Minor > Labels: cql3 > Fix For: 2.0 > > > This is currently supported via Thrift but not via CQL. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira