The original timestamp is bigger than the timestamp you're using in your
batch.  Cassandra uses timestamps for conflict resolution, so the batch
write will lose.

On Wed, Sep 13, 2017 at 11:59 AM Deepak Panda <deepak.pa...@gmail.com>
wrote:

> Hi All,
>
> Am in the process of learning batch operations. Here is what I tried.
>
> Executed a CQL query against the student table(student_id is the primary
> key).
>
>
> select student_id,position,WRITETIME(class_id),WRITETIME(position)
> FROM student WHERE student_id='s123';
>
> student_id position writetime(class_id) writetime(position)
> s123          1         1505293712083000 1505293712083000
>
>
> Then tried to update the "position" column using the following BATCH
> operation.
>
> BEGIN BATCH USING TIMESTAMP 1505291962469002
>  UPDATE
> student
> SET
> POSITION = 3
> WHERE
> student_id = 's123';
> APPLY BATCH;
>
> In this case the update does not take effect.
>
> But when I remove "USING TIMESTAMP" clause it works as expected.
>
> What could be the reason? I am using Casandra 3.11.
>
> Regards,
> AL
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
> For additional commands, e-mail: user-h...@cassandra.apache.org
>
>

Reply via email to