Cassandra row level isolation

独自空忆成欢 提交于 2019-12-11 13:38:35

问题


I have a table created in cql :

create table isolation_demo(key text,column1 text,column2 text,column3 text ,primary key(key,column1,column2));

I have 2 statement in a batch.

update isolation_demo set column3 ='ABC' where key =1 and column1 =1 and column2=1;
delete from isolation_demo where key =1 and column1 =2 and column2=2;

here the both statements share same partition key. (key=1), but different clustering column values. Will these 2 statements be isolated?


回答1:


These queries must be isolated, as mentioned in C* docs here and here:

In early versions of Cassandra, it was possible to see partial updates in a row when one user was updating the row while another user was reading that same row. For example, if one user was writing a row with two thousand columns, another user could potentially read that same row and see some of the columns, but not all of them if the write was still in progress.

Full row-level isolation is in place, which means that writes to a row are isolated to the client performing the write and are not visible to any other user until they are complete.



来源:https://stackoverflow.com/questions/30643789/cassandra-row-level-isolation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!