[ 
https://issues.apache.org/jira/browse/CASSANDRA-2569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Cathy Daw resolved CASSANDRA-2569.
----------------------------------

    Resolution: Not A Problem

http://wiki.apache.org/cassandra/FAQ#range_ghosts

> Deleting a record for a key that doesn't exist, creates a key for the record
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2569
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2569
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Cathy Daw
>            Priority: Minor
>
> This bug is similar to CASSANDRA-2548 where a delete did not do a full 
> delete.  This is filed since the delete itself did an insert. 
> *Test Setup*
> {code}
> CREATE KEYSPACE cqldb with strategy_class = 
> 'org.apache.cassandra.locator.SimpleStrategy'  
> and strategy_options:replication_factor=1;
> use cqldb;
> CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY, password varchar, gender 
> varchar, 
> session_token varchar, state varchar, birth_year bigint);
> INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user1', 
> 'ch@ngem3', 'f', 'CA', '1971');
> {code}
> *CQLSH: Delete a row and a column using non-existent keys*
> {code}
> cqlsh> DELETE bad_col FROM users where KEY = 'user2';
> cqlsh> DELETE from users where KEY = 'user3';
> cqlsh> select * from users;
> u'user1' | u'birth_year',1971 | u'gender',u'f' | u'password',u'ch@ngem3' | 
> u'state',u'CA'
> u'user3'
> u'user2'
> {code}
> *Same is reproducible in cassandra-cli*
> {code}
> Authenticated to keyspace: cqldb
> [default@cqldb] del users ['user11'];
> row removed.
> [default@cqldb] del users['user12']['badcol2'];
> column removed.
> [default@cqldb] list users;
> Using default limit of 100
> -------------------
> RowKey: user11
> -------------------
> RowKey: user1
> => (column=birth_year, value=1971, timestamp=1303849935934)
> => (column=gender, value=f, timestamp=1303849935936)
> => (column=password, value=ch@ngem3, timestamp=1303849935936)
> => (column=state, value=CA, timestamp=1303849935936)
> -------------------
> RowKey: user12
> -------------------
> RowKey: user3
> -------------------
> RowKey: user2
> 5 Rows Returned.
> [default@cqldb] get users['user12'];
> Returned 0 results.
> [default@cqldb] get users['user2']; 
> Returned 0 results.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to