You're running into funny results due to the way CQL3 handles statements in
batches. Read this:
https://github.com/doanduyhai/Achilles/wiki/Batch-Mode#statements-ordering
There is already a JIRA opened but according to the developers this is the
expected behavior.

 In your example, largest value for column "count" is 9 and largest value
for "text" is "123" (sorted by lexicographic order)


On Sat, Aug 16, 2014 at 1:45 PM, 廖欽啟 <missionaryl...@gmail.com> wrote:

> Hi,
>
>    I'm trying this cql against cassandra 2.0.9:
>    BEGIN  BATCH
>       INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count,
> text) VALUES (1, 8, '123');
>       INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count,
> text) VALUES (1, 9, '111');
>    APPLY BATCH;
>
>    In this case, id is the primary key.
>    And when querying the record with id=1, the result I got is (id=1,
> count=9, text='123'), while I expect
>    the result should be (id=1, count=9, text='111').
>
>    Did I miss anything or is this result expected?
>
> B.R,
> Mission.
>

Reply via email to