[ 
https://issues.apache.org/jira/browse/CASSANDRA-6291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis resolved CASSANDRA-6291.
---------------------------------------

    Resolution: Not A Problem

Statement order does not matter within a batch; all rows will be applied with 
the same timestamp.  See also http://wiki.apache.org/cassandra/FAQ#clocktie

> Unexpected update result in batch
> ---------------------------------
>
>                 Key: CASSANDRA-6291
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6291
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 1.2.11
> java version "1.6.0_37"
> Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
> Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
> Ubuntu 12.04
>            Reporter: Vladimir Kuptsov
>
> I tried to execute the following script through the cqlsh console:
> CREATE KEYSPACE testspace WITH replication = {'class':'SimpleStrategy', 
> 'replication_factor':1};
> USE testspace;
> CREATE TABLE test (
>       user_id bigint,
>       user_data varchar,
>       deleted boolean,
>       PRIMARY KEY (user_id)
> );
> BEGIN BATCH
> UPDATE test SET deleted=true WHERE user_id=1;
> UPDATE test SET deleted=false, user_data='data' WHERE user_id=1;
> APPLY BATCH;
> After that I tried to fetch data:
> cqlsh:testspace> SELECT * FROM test;
>  user_id | deleted | user_data
> ---------+---------+-----------
>        1 |    True |      data
> As you can see, I've got "true" in the "deleted" column, but the last 
> statement in batch is "UPDATE test SET deleted=false, user_data='data' WHERE 
> user_id=1;"
> Moreover the statements order in the batch doesn't influence on the result.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to