[ https://issues.apache.org/jira/browse/CASSANDRA-4193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263638#comment-13263638 ]
Sylvain Lebresne commented on CASSANDRA-4193: --------------------------------------------- So for the compact case, this is a dupe of CASSANDRA-3708, it in fact requires a range tombstone (they could be millions of record having the 'abc' and 2 as first components). The reason for the non-compact case is very similar, this amount internally to remove multiple columns. However in that second we could implement a workaround as we know which columns are defined for the table. However, for this too CASSANDRA-3708 will offer a better fix, as it will be more efficient to have 1 (range) tombstone rather than n where n is the number of columns in the table and less special code once CASSANDRA-3708 is in. So what I propose is for now to throw an error on the compact case and support the second one by deleting each column individually. Once CASSANDRA-3708 is in, we'll use it to replace the second part. Patch attached to do that. > cql delete does not delete > --------------------------- > > Key: CASSANDRA-4193 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4193 > Project: Cassandra > Issue Type: Bug > Affects Versions: 1.1.0 > Reporter: Jackson Chung > Assignee: Sylvain Lebresne > Labels: cql3 > Fix For: 1.1.1 > > Attachments: 4193.txt > > > tested in 1.1 and trunk branch on a single node: > {panel} > cqlsh:test> create table testcf_old ( username varchar , id int , name > varchar , stuff varchar, primary key(username,id,name)) with compact storage; > cqlsh:test> insert into testcf_old ( username , id , name , stuff ) values > ('abc', 2, 'rst', 'some other bunch of craps'); > cqlsh:test> select * from testcf_old; > username | id | name | stuff > ----------+----+------+--------------------------- > abc | 2 | rst | some other bunch of craps > abc | 4 | xyz | a bunch of craps > cqlsh:test> delete from testcf_old where username = 'abc' and id =2; > cqlsh:test> select * from testcf_old; > username | id | name | stuff > ----------+----+------+--------------------------- > abc | 2 | rst | some other bunch of craps > abc | 4 | xyz | a bunch of craps > {panel} > same also when not using compact: > {panel} > cqlsh:test> create table testcf ( username varchar , id int , name varchar , > stuff varchar, primary key(username,id)); > cqlsh:test> select * from testcf; > username | id | name | stuff > ----------+----+---------------------------+------------------ > abc | 2 | some other bunch of craps | rst > abc | 4 | xyz | a bunch of craps > cqlsh:test> delete from testcf where username = 'abc' and id =2; > cqlsh:test> select * from testcf; > username | id | name | stuff > ----------+----+---------------------------+------------------ > abc | 2 | some other bunch of craps | rst > abc | 4 | xyz | a bunch of craps > {panel} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira