incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wayne <wav...@gmail.com>
Subject Re: buggy secondary indexes?
Date Mon, 13 Sep 2010 13:18:12 GMT
This is a use case we have been struggling with for a long time. How do we
maintain indexes? It is easy to write out a secondary index even manually,
but how does one maintain and index when a value changes. Our only scalable
answer has been background processes that churn through everything to verify
that the index is current. We have yet to test .7 secondary indexes, but
even the sample code out there for async triggers does not show dealing with
this. In db terms this would have to be a before update trigger to capture
the current value and delete it.

http://maxgrinev.com/2010/07/23/managing-indexes-in-cassandra-using-async-triggers/

This is the main problem with maintaining secondary indexes. We and I think
many others are waiting for more detailed examples of how to best create
secondary indexes that deals with these types of issues. The wiki is still
TBD, and we are staying away from .7 until it is stabilized with better
examples (what about super columns?).

How has every one else dealt with this issue?


On Mon, Sep 13, 2010 at 8:59 AM, Petr Odut <petr.odut@gmail.com> wrote:

> OK, I'll try it, but this:
>
> "recreate user with different email, then finding user by original email
> returns again that updated user"
> --> remove user "user" && insert new user: "user":{"email":"
> other@email.com"}
>
> doesn't crash on thrift, it seems to be cassandra issue.
>
> Petr
>
>
> On Mon, Sep 13, 2010 at 11:26 AM, Mike Peters <
> cassandra@softwareprojects.com> wrote:
>
>>  Sounds like you may need to patch your php thrift
>>
>> See
>> http://www.softwareprojects.com/resources/programming/t-php-thrift-library-for-cassandra-1982.html
>>
>>
>> On 9/13/2010 5:09 AM, Petr Odut wrote:
>>
>> Hi,
>> let's have CF User with indexed column email.
>>
>>  Now i insert new user: "user":{"email":"some@email.com"}
>>
>>  finding user by email address by get_indexed_slices ... everything works
>> all right
>> updating email value (via batch_mutate) ends with TTransportException (TSocket:
>> timed out reading 4 bytes from localhost:9160)
>> remove user, then try to find user by email again - it returns an empty
>> user "user":{}
>> recreate user with different email, then finding user by original email is
>> successful
>>
>> Hope that last 3 points are buggy behaviour,
>> using cassandra 0.7beta1 + php thrift
>>
>>  Petr
>>
>>
>>
>
>
> --
> Petr Odut [petr.odut@gmail.com]
>

Mime
View raw message