cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-920) Deleting and re-inserting row causes error in get_slice count parameter
Date Fri, 26 Mar 2010 03:03:27 GMT

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

Jonathan Ellis updated CASSANDRA-920:
-------------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 0.6

> 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
>            Priority: Minor
>             Fix For: 0.6
>
>
> 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.


Mime
View raw message