You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Nick Santini <ni...@kaseya.com> on 2011/01/25 23:59:10 UTC

get_range_slices getting deleted rows

Hi,
I'm trying a test scenario where I create 100 rows in a CF, then
use get_range_slices to get all the rows, and I get 100 rows, so far so good
then after the test I delete the rows using "remove" but without a column or
super column, this deletes the row, I can confirm that cos if I try to get
it with get_slice using the key I get nothing

but then if I do get_range_slice again, where the range goes between new
byte[0] and new byte[0] (therefore returning everything), I still get the
100 row keys

is that expected to be?

thanks

Nicolas Santini

Re: get_range_slices getting deleted rows

Posted by Roshan Dawrani <ro...@gmail.com>.
No, checking the key will not do.

You will need to check if row.getColumnSlice().getColumns() is empty or not.
That's what I do and it works for me.

On Wed, Jan 26, 2011 at 4:53 AM, Nick Santini <ni...@kaseya.com>wrote:

> thanks,
> so I need to check the returned slice for the key to verify that is a valid
> row and not a deleted one?
>
> Nicolas Santini
>
>
>
> On Wed, Jan 26, 2011 at 12:16 PM, Narendra Sharma <
> narendra.sharma@gmail.com> wrote:
>
>> Yes. See this http://wiki.apache.org/cassandra/FAQ#range_ghosts
>>
>> -Naren
>>
>>
>> On Tue, Jan 25, 2011 at 2:59 PM, Nick Santini <ni...@kaseya.com>wrote:
>>
>>> Hi,
>>> I'm trying a test scenario where I create 100 rows in a CF, then
>>> use get_range_slices to get all the rows, and I get 100 rows, so far so good
>>> then after the test I delete the rows using "remove" but without a column
>>> or super column, this deletes the row, I can confirm that cos if I try to
>>> get it with get_slice using the key I get nothing
>>>
>>> but then if I do get_range_slice again, where the range goes between new
>>> byte[0] and new byte[0] (therefore returning everything), I still get the
>>> 100 row keys
>>>
>>> is that expected to be?
>>>
>>> thanks
>>>
>>> Nicolas Santini
>>>
>>
>>
>

Re: get_range_slices getting deleted rows

Posted by Nick Santini <ni...@kaseya.com>.
thanks,
so I need to check the returned slice for the key to verify that is a valid
row and not a deleted one?

Nicolas Santini



On Wed, Jan 26, 2011 at 12:16 PM, Narendra Sharma <narendra.sharma@gmail.com
> wrote:

> Yes. See this http://wiki.apache.org/cassandra/FAQ#range_ghosts
>
> -Naren
>
>
> On Tue, Jan 25, 2011 at 2:59 PM, Nick Santini <ni...@kaseya.com>wrote:
>
>> Hi,
>> I'm trying a test scenario where I create 100 rows in a CF, then
>> use get_range_slices to get all the rows, and I get 100 rows, so far so good
>> then after the test I delete the rows using "remove" but without a column
>> or super column, this deletes the row, I can confirm that cos if I try to
>> get it with get_slice using the key I get nothing
>>
>> but then if I do get_range_slice again, where the range goes between new
>> byte[0] and new byte[0] (therefore returning everything), I still get the
>> 100 row keys
>>
>> is that expected to be?
>>
>> thanks
>>
>> Nicolas Santini
>>
>
>

Re: get_range_slices getting deleted rows

Posted by Narendra Sharma <na...@gmail.com>.
Yes. See this http://wiki.apache.org/cassandra/FAQ#range_ghosts

-Naren

On Tue, Jan 25, 2011 at 2:59 PM, Nick Santini <ni...@kaseya.com>wrote:

> Hi,
> I'm trying a test scenario where I create 100 rows in a CF, then
> use get_range_slices to get all the rows, and I get 100 rows, so far so good
> then after the test I delete the rows using "remove" but without a column
> or super column, this deletes the row, I can confirm that cos if I try to
> get it with get_slice using the key I get nothing
>
> but then if I do get_range_slice again, where the range goes between new
> byte[0] and new byte[0] (therefore returning everything), I still get the
> 100 row keys
>
> is that expected to be?
>
> thanks
>
> Nicolas Santini
>