Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 68810 invoked from network); 8 Apr 2010 21:04:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Apr 2010 21:04:58 -0000 Received: (qmail 12006 invoked by uid 500); 8 Apr 2010 21:04:57 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 11984 invoked by uid 500); 8 Apr 2010 21:04:57 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 11976 invoked by uid 99); 8 Apr 2010 21:04:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 21:04:57 +0000 X-ASF-Spam-Status: No, hits=-1251.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 21:04:56 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 947A2234C052 for ; Thu, 8 Apr 2010 21:04:36 +0000 (UTC) Message-ID: <620049672.21141270760676600.JavaMail.jira@brutus.apache.org> Date: Thu, 8 Apr 2010 21:04:36 +0000 (UTC) From: "Ryan King (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Commented: (CASSANDRA-920) Deleting and re-inserting row causes error in get_slice count parameter In-Reply-To: <1769051548.499221269557667143.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855149#action_12855149 ] Ryan King commented on CASSANDRA-920: ------------------------------------- I've rewritten this in terms of our cassandra.gem test suite and can't seem to find a bug in the client. It fails on the last line. {code} @twitter.insert(:StatusRelationships, key, {'user_timelines' => {@uuids[0] => 'Item 0', @uuids[1] => 'Item 1', @uuids[2] => 'Item 2'}}) @twitter.remove(:StatusRelationships, key) items = @twitter.get(:StatusRelationships, key, 'user_timelines') assert_equal 0, items.size @twitter.insert(:StatusRelationships, key, {'user_timelines' => {@uuids[2] => 'Item 2', @uuids[3] => 'Item 3', @uuids[4] => 'Item 4'}}) items = @twitter.get(:StatusRelationships, key, 'user_timelines') assert_equal 3, items.size items = @twitter.get(:StatusRelationships,key,'user_timelines',:count => 3) assert_equal 3, items.size {code} And the server logs for this whole test: {code} DEBUG - batch_mutate DEBUG - insert writing local key test_get_super_sub_keys_with_count_after_remove DEBUG - remove DEBUG - insert writing local key test_get_super_sub_keys_with_count_after_remove DEBUG - multiget_slice DEBUG - weakreadlocal reading SliceFromReadCommand(table='Twitter', key='test_get_super_sub_keys_with_count_after_remove', column_parent='QueryPath(columnFamilyName='StatusRelationships', superColumnName='[B@746a63d3', columnName='null')', start='', finish='', reversed=false, count=100) DEBUG - batch_mutate DEBUG - insert writing local key test_get_super_sub_keys_with_count_after_remove DEBUG - multiget_slice DEBUG - weakreadlocal reading SliceFromReadCommand(table='Twitter', key='test_get_super_sub_keys_with_count_after_remove', column_parent='QueryPath(columnFamilyName='StatusRelationships', superColumnName='[B@3bd840d9', columnName='null')', start='', finish='', reversed=false, count=100) DEBUG - collecting 93814000-b668-11b2-8e6a-06dc05f11207:false:6@1270760311002397 DEBUG - collecting 13814000-4eff-11b3-88b0-351600af16aa:false:6@1270760311002397 DEBUG - collecting 13814000-802c-11b4-8782-bede78b81183:false:6@1270760311069304 DEBUG - collecting 13814000-e286-11b6-9ea9-48a9edd974b6:false:6@1270760311069304 DEBUG - collecting 13814000-a73a-11bb-8a14-b8d289de6d53:false:6@1270760311069304 DEBUG - multiget_slice DEBUG - weakreadlocal reading SliceFromReadCommand(table='Twitter', key='test_get_super_sub_keys_with_count_after_remove', column_parent='QueryPath(columnFamilyName='StatusRelationships', superColumnName='[B@6e37d490', columnName='null')', start='', finish='', reversed=false, count=3) DEBUG - collecting 93814000-b668-11b2-8e6a-06dc05f11207:false:6@1270760311002397 DEBUG - collecting 13814000-4eff-11b3-88b0-351600af16aa:false:6@1270760311002397 DEBUG - collecting 13814000-802c-11b4-8782-bede78b81183:false:6@1270760311069304 DEBUG - GC for ParNew: 7 ms, 20659648 reclaimed leaving 19819056 used; max is 1211826176 {code} And the thrift structures for the failing multiget_slice {code} > {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 > 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.