You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by JKnight JKnight <be...@gmail.com> on 2009/12/14 07:20:48 UTC

Get_count method error?

Dear all, I found method get_count still count "deleted" column. Is this an
error?

get_count

   -

   i32 get_count(keyspace, key, column_parent, consistency_level)

Counts the columns present in column_parent.

-- 
Best regards,
JKnight

Re: Get_count method error?

Posted by Adam Fisk <a...@littleshoot.org>.
I don't have a usable test case separated out at the moment for this
in particular. It's likely, however, that the previously submitted
test case also fails with a consistency level of one, as that's what
I'm seeing.

-Adam


On Tue, Dec 22, 2009 at 7:02 PM, Jonathan Ellis <jb...@gmail.com> wrote:
> As I said, a test case against the example CF definitions
> illustrating the problem would help us fix the problem.
>
> -Jonathan
>
> On Tue, Dec 22, 2009 at 8:56 PM, Adam Fisk <a...@littleshoot.org> wrote:
>> Just wanted to add I'm seeing the same thing on trunk running
>> everything with a consistency level of one.
>>
>> I'm running -r893382 (a week back or so I believe).
>



-- 
Adam Fisk
http://www.littleshoot.org | http://adamfisk.wordpress.com |
http://twitter.com/adamfisk

Re: Get_count method error?

Posted by Jonathan Ellis <jb...@gmail.com>.
As I said, a test case against the example CF definitions
illustrating the problem would help us fix the problem.

-Jonathan

On Tue, Dec 22, 2009 at 8:56 PM, Adam Fisk <a...@littleshoot.org> wrote:
> Just wanted to add I'm seeing the same thing on trunk running
> everything with a consistency level of one.
>
> I'm running -r893382 (a week back or so I believe).

Re: Get_count method error?

Posted by Adam Fisk <a...@littleshoot.org>.
Just wanted to add I'm seeing the same thing on trunk running
everything with a consistency level of one.

I'm running -r893382 (a week back or so I believe).

All the Best,

-Adam


On Tue, Dec 15, 2009 at 7:25 PM, Brandon Williams <dr...@gmail.com> wrote:
> On Tue, Dec 15, 2009 at 9:19 PM, JKnight JKnight <be...@gmail.com>
> wrote:
>>
>> Dear Mr Jonathan,
>>
>> I have tested on version 0.4.2 and 0.5.0.
>> The attachment contains my test case.
>
> You are inserting and performing get_count with a consistency level of one,
> but deleting with a consistency level of zero.  Can you try deleting with a
> consistency level of one also?
> -Brandon



-- 
Adam Fisk
http://www.littleshoot.org | http://adamfisk.wordpress.com |
http://twitter.com/adamfisk

Re: Get_count method error?

Posted by Brandon Williams <dr...@gmail.com>.
On Tue, Dec 15, 2009 at 9:19 PM, JKnight JKnight <be...@gmail.com>wrote:

> Dear Mr Jonathan,
>
> I have tested on version 0.4.2 and 0.5.0.
> The attachment contains my test case.


You are inserting and performing get_count with a consistency level of one,
but deleting with a consistency level of zero.  Can you try deleting with a
consistency level of one also?

-Brandon

Re: Get_count method error?

Posted by JKnight JKnight <be...@gmail.com>.
Dear Mr Jonathan,

I have tested on version 0.4.2 and 0.5.0.
The attachment contains my test case.


On Tue, Dec 15, 2009 at 12:44 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> ... oh, and what version are you running against?
>
> On Tue, Dec 15, 2009 at 11:04 AM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> > there is similar logic already in multigetInternal, so it's not
> > immediately clear what the bug is.
> >
> > can you supply a test case against the example CF definitions
> > illustrating the problem?
> >
> > On Tue, Dec 15, 2009 at 4:03 AM, JKnight JKnight <be...@gmail.com>
> wrote:
> >> Dear Mr Jonathan,
> >>
> >> I have changed a litle in multigetColumns method in CassandraServer.java
> >> file to solve this error.
> >>
> >>             if (columns != null && columns.size() != 0)
> >>             {
> >>                 Iterator<IColumn> columnItr = columns.iterator();
> >>                 IColumn column;
> >>                 while (columnItr.hasNext()) {
> >>                     column = (IColumn) columnItr.next();
> >>                     if(column.isMarkedForDelete()){
> >>                         columns.remove(column);
> >>                     }
> >>                 }
> >>                 columnFamiliesMap.put(command.key, columns);
> >>             }
> >>
> >> On Mon, Dec 14, 2009 at 8:33 AM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >>>
> >>> yes, that would be a bug
> >>>
> >>> On 12/14/09, JKnight JKnight <be...@gmail.com> wrote:
> >>> > Dear all, I found method get_count still count "deleted" column. Is
> this
> >>> > an
> >>> > error?
> >>> >
> >>> > get_count
> >>> >
> >>> >    -
> >>> >
> >>> >    i32 get_count(keyspace, key, column_parent, consistency_level)
> >>> >
> >>> > Counts the columns present in column_parent.
> >>> >
> >>> > --
> >>> > Best regards,
> >>> > JKnight
> >>> >
> >>
> >>
> >>
> >> --
> >> Best regards,
> >> JKnight
> >>
> >
>



-- 
Best regards,
JKnight

Re: Get_count method error?

Posted by Jonathan Ellis <jb...@gmail.com>.
... oh, and what version are you running against?

On Tue, Dec 15, 2009 at 11:04 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> there is similar logic already in multigetInternal, so it's not
> immediately clear what the bug is.
>
> can you supply a test case against the example CF definitions
> illustrating the problem?
>
> On Tue, Dec 15, 2009 at 4:03 AM, JKnight JKnight <be...@gmail.com> wrote:
>> Dear Mr Jonathan,
>>
>> I have changed a litle in multigetColumns method in CassandraServer.java
>> file to solve this error.
>>
>>             if (columns != null && columns.size() != 0)
>>             {
>>                 Iterator<IColumn> columnItr = columns.iterator();
>>                 IColumn column;
>>                 while (columnItr.hasNext()) {
>>                     column = (IColumn) columnItr.next();
>>                     if(column.isMarkedForDelete()){
>>                         columns.remove(column);
>>                     }
>>                 }
>>                 columnFamiliesMap.put(command.key, columns);
>>             }
>>
>> On Mon, Dec 14, 2009 at 8:33 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>>
>>> yes, that would be a bug
>>>
>>> On 12/14/09, JKnight JKnight <be...@gmail.com> wrote:
>>> > Dear all, I found method get_count still count "deleted" column. Is this
>>> > an
>>> > error?
>>> >
>>> > get_count
>>> >
>>> >    -
>>> >
>>> >    i32 get_count(keyspace, key, column_parent, consistency_level)
>>> >
>>> > Counts the columns present in column_parent.
>>> >
>>> > --
>>> > Best regards,
>>> > JKnight
>>> >
>>
>>
>>
>> --
>> Best regards,
>> JKnight
>>
>

Re: Get_count method error?

Posted by Jonathan Ellis <jb...@gmail.com>.
there is similar logic already in multigetInternal, so it's not
immediately clear what the bug is.

can you supply a test case against the example CF definitions
illustrating the problem?

On Tue, Dec 15, 2009 at 4:03 AM, JKnight JKnight <be...@gmail.com> wrote:
> Dear Mr Jonathan,
>
> I have changed a litle in multigetColumns method in CassandraServer.java
> file to solve this error.
>
>             if (columns != null && columns.size() != 0)
>             {
>                 Iterator<IColumn> columnItr = columns.iterator();
>                 IColumn column;
>                 while (columnItr.hasNext()) {
>                     column = (IColumn) columnItr.next();
>                     if(column.isMarkedForDelete()){
>                         columns.remove(column);
>                     }
>                 }
>                 columnFamiliesMap.put(command.key, columns);
>             }
>
> On Mon, Dec 14, 2009 at 8:33 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>
>> yes, that would be a bug
>>
>> On 12/14/09, JKnight JKnight <be...@gmail.com> wrote:
>> > Dear all, I found method get_count still count "deleted" column. Is this
>> > an
>> > error?
>> >
>> > get_count
>> >
>> >    -
>> >
>> >    i32 get_count(keyspace, key, column_parent, consistency_level)
>> >
>> > Counts the columns present in column_parent.
>> >
>> > --
>> > Best regards,
>> > JKnight
>> >
>
>
>
> --
> Best regards,
> JKnight
>

Re: Get_count method error?

Posted by JKnight JKnight <be...@gmail.com>.
Dear Mr Jonathan,

I have changed a litle in multigetColumns method in CassandraServer.java
file to solve this error.

            if (columns != null && columns.size() != 0)
            {
                Iterator<IColumn> columnItr = columns.iterator();
                IColumn column;
                while (columnItr.hasNext()) {
                    column = (IColumn) columnItr.next();
                    if(column.isMarkedForDelete()){
                        columns.remove(column);
                    }
                }
                columnFamiliesMap.put(command.key, columns);
            }

On Mon, Dec 14, 2009 at 8:33 AM, Jonathan Ellis <jb...@gmail.com> wrote:

> yes, that would be a bug
>
> On 12/14/09, JKnight JKnight <be...@gmail.com> wrote:
> > Dear all, I found method get_count still count "deleted" column. Is this
> an
> > error?
> >
> > get_count
> >
> >    -
> >
> >    i32 get_count(keyspace, key, column_parent, consistency_level)
> >
> > Counts the columns present in column_parent.
> >
> > --
> > Best regards,
> > JKnight
> >
>



-- 
Best regards,
JKnight

Re: Get_count method error?

Posted by Jonathan Ellis <jb...@gmail.com>.
yes, that would be a bug

On 12/14/09, JKnight JKnight <be...@gmail.com> wrote:
> Dear all, I found method get_count still count "deleted" column. Is this an
> error?
>
> get_count
>
>    -
>
>    i32 get_count(keyspace, key, column_parent, consistency_level)
>
> Counts the columns present in column_parent.
>
> --
> Best regards,
> JKnight
>