[ https://issues.apache.org/jira/browse/CASSANDRA-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856114#action_12856114 ]
Jonathan Ellis commented on CASSANDRA-920: ------------------------------------------ {code} PYTHONPATH=test nosetests --tests=system.test_server:TestMutations.test_super_reinsert . ---------------------------------------------------------------------- Ran 1 test in 2.432s OK {code} > Deleting and re-inserting row causes error in get_slice count parameter > ----------------------------------------------------------------------- > > Key: CASSANDRA-920 > URL: https://issues.apache.org/jira/browse/CASSANDRA-920 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 0.5 > Environment: Mac OS/ Java 6 > Reporter: Bob Florian > Assignee: Brandon Williams > Priority: Minor > Fix For: 0.6.1 > > Attachments: 0001_add_system_test.txt > > > I've found that when I delete an entire row in a column family with super > columns, and then re-insert values with the same row and super column keys, > the count parameter to the get_slice call no longer works properly. Its like > it is still counting the deleted columns, but only returning the new columns. > The following example uses the Ruby Cassandra client (see link below), but > I've seen the same behavior with the Java Thrift interface. > Test code: > -------------- > require 'rubygems' > require 'cassandra' > cc = Cassandra.new('Keyspace1') > cc.insert(:Super1,'test-key1',{'bucket1' => {'1' => 'Item 1', '2' => 'Item > 2', '5' => 'Item 5'}}) > items = cc.get(:Super1,'test-key1','bucket1') > puts "returned #{items.size} items, should be 3" > cc.remove(:Super1,'test-key1') > items = cc.get(:Super1,'test-key1','bucket1') > puts "returned #{items.size} items, should be 0" > cc.insert(:Super1,'test-key1',{'bucket1' => {'3' => 'Item 3', '4' => 'Item > 4', '6' => 'Item 6'}}) > items = cc.get(:Super1,'test-key1','bucket1') > puts "returned #{items.size} items, should be 3" > items = cc.get(:Super1,'test-key1','bucket1',:count => 3) > puts "returned #{items.size} items, should be 3" > items = cc.get(:Super1,'test-key1','bucket1',:count => 4) > puts "returned #{items.size} items, should be 3" > items = cc.get(:Super1,'test-key1','bucket1',:count => 5) > puts "returned #{items.size} items, should be 3" > items = cc.get(:Super1,'test-key1','bucket1',:count => 6) > puts "returned #{items.size} items, should be 3" > Output: > returned 3 items, should be 3 > returned 0 items, should be 0 > returned 3 items, should be 3 > returned 1 items, should be 3 > returned 2 items, should be 3 > returned 2 items, should be 3 > returned 3 items, should be 3 > Ruby library link: > http://blog.evanweaver.com/files/doc/fauna/cassandra/files/README_rdoc.html -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira