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 0A16010736 for ; Thu, 1 May 2014 18:06:17 +0000 (UTC) Received: (qmail 11829 invoked by uid 500); 1 May 2014 18:06:15 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 11761 invoked by uid 500); 1 May 2014 18:06:15 -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 11752 invoked by uid 99); 1 May 2014 18:06:14 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2014 18:06:14 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AD89288BD2E; Thu, 1 May 2014 18:06:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tylerhobbs@apache.org To: commits@cassandra.apache.org Date: Thu, 01 May 2014 18:06:14 -0000 Message-Id: <8825f9b9662b4c66ad65f0ea5f52b619@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: Document lack of order guarantees for BATCH statements Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 e786101eb -> 1491f75dd Document lack of order guarantees for BATCH statements Patch by Tyler Hobbs, reviewed by Sylvain Lebresnse and Alex Popescu for CASSANDRA-7123 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/427fdd47 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/427fdd47 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/427fdd47 Branch: refs/heads/cassandra-2.1 Commit: 427fdd476a631b3850ecd643f71155a5b7dd2bf7 Parents: d5a9c92 Author: Tyler Hobbs Authored: Thu May 1 13:03:56 2014 -0500 Committer: Tyler Hobbs Committed: Thu May 1 13:03:56 2014 -0500 ---------------------------------------------------------------------- doc/cql3/CQL.textile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/427fdd47/doc/cql3/CQL.textile ---------------------------------------------------------------------- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index f6208bf..bedd189 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -614,7 +614,11 @@ The @BATCH@ statement group multiple modification statements (insertions/updates # It saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. # All updates in a @BATCH@ belonging to a given partition key are performed in isolation. # By default, all operations in the batch are performed atomically. See the notes on "@UNLOGGED@":#unloggedBatch for more details. -Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and @DELETE@ statements and is _not_ a full analogue for SQL transactions. + +Note that: +* @BATCH@ statements may only contain @UPDATE@, @INSERT@ and @DELETE@ statements. +* Batches are _not_ a full analogue for SQL transactions. +* If a timestamp is not specified for each operation, then all operations will be applied with the same timestamp. Due to Cassandra's conflict resolution procedure in the case of "timestamp ties":http://wiki.apache.org/cassandra/FAQ#clocktie, operations may be applied in an order that is different from the order they are listed in the @BATCH@ statement. To force a particular operation ordering, you must specify per-operation timestamps. h4(#unloggedBatch). @UNLOGGED@