cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Williams (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CASSANDRA-920) Deleting and re-inserting row causes error in get_slice count parameter
Date Wed, 07 Apr 2010 20:40:33 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854692#action_12854692
] 

Brandon Williams edited comment on CASSANDRA-920 at 4/7/10 8:39 PM:
--------------------------------------------------------------------

Patch to reproduce with a system test.  Note that there is a commented get_count in here.
 If you uncomment it, strangely enough, the test passes.

      was (Author: brandon.williams):
    Patch to reproduce with a system test.  Note that there is a comment get_count in here.
 If you uncomment it, strangely enough, the test passes.
  
> 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.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.


Mime
View raw message