1
votes

When I select following query, it returns this record:

cqlsh:my_keyspace> select status from my_devices where deviceid='ffffffff-b897-c010-0000-xxx43' ;

status
--------
  4

But when I tried exactly the same where clause in update cql, it doesnt affect the row.

cqlsh:my_keyspace> update my_devices set status=1 where deviceid='ffffffff-b897-c010-0000-xxx43';
cqlsh:subscriber_data_keyspace> 

What could be the cause of this issue?

1
What does your table definition look like? Also, try running both the SELECT and UPDATE queries with tracing on, and see if that reveals any clues.Aaron

1 Answers

0
votes

It looks like a consistency issue. You can change the consistency level of cqlsh with command CONSISTENCY level. I suggest you use QUORUM.

For more information about consistency read this.