[ https://issues.apache.org/jira/browse/CASSANDRA-920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams updated CASSANDRA-920: --------------------------------------- Attachment: 0001_add_system_test.txt After much head scratching, Ryan and I figured out you have to remove the entire row, not just the subcolumns, to cause this. Updated system test which does indeed fail. > 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 > Affects Versions: 0.5, 0.6 > 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. - You can reply to this email to add a comment to the issue online.