Arpit
Arpit

Reputation: 478

Cassandra issue with Update query

Cassandra is unable to update list(uuid) column type but other column can be updated.This happens when we first insert then update in Python but If we put sleep before the update query then update query able to update list(uuid) column. What can be possible reason for this ?

Update query is simple :

update a set tids = [d181cf28-1e60-4120-92c4-902dfec88a4c] where cid=d181cf28-1e60-4120-92c4-902dfec88a4a and did=e3e8ac10-47b4-48b6-9b72-302a1d98456d and cname='m_2017' and vn=0 IF EXISTS 

Upvotes: 0

Views: 309

Answers (1)

Arpit
Arpit

Reputation: 478

Finally,I found the answer in Cassandra documentation :

https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlLtwtTransactions.html

In my Scenario Sequence of Transactions are

Delete (Without if exist) -> Insert(Without if not exist) -> Update(With if exist).

In this sequence,Last update is lightweight transaction.So if we make whole sequence lightweight then it solved my problem.Other wise some-time this sequence work fine sometimes its unable to update the row.

Upvotes: 1

Related Questions