You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by srmore <co...@gmail.com> on 2013/08/12 21:31:41 UTC

Distributed lock for cassandra

All,
There are some operations that demand the use lock and I was wondering
whether Cassandra has a built in locking mechanism. After hunting the web
for a while it appears that the answer is no, although I found this
outdated wiki page which describes the algorithm
http://wiki.apache.org/cassandra/Locking was this implemented ?

It would be great if people on the list can share their experiences / best
practices about locking.
Does anyone use cages https://code.google.com/p/cages/ ? if yes it would be
nice if you guys can share your experiences.

Thanks,
Sandeep

Re: Distributed lock for cassandra

Posted by srmore <co...@gmail.com>.
On Mon, Aug 12, 2013 at 2:49 PM, Robert Coli <rc...@eventbrite.com> wrote:

> On Mon, Aug 12, 2013 at 12:31 PM, srmore <co...@gmail.com> wrote:
>
>> There are some operations that demand the use lock and I was wondering
>> whether Cassandra has a built in locking mechanism. After hunting the web
>> for a while it appears that the answer is no, although I found this
>> outdated wiki page which describes the algorithm
>> http://wiki.apache.org/cassandra/Locking was this implemented ?
>>
>> It would be great if people on the list can share their experiences /
>> best practices about locking.
>>
>
> If your application needs a lot of locking, it is probably not ideal for a
> distributed, log structured database with immutable data files.
>

This was the answer I was afraid of ... , not a lot of locking but now and
then I do need it, that said creating the username problem described in the
bug pretty much describes my problem.


>
> That said, Cassandra 2.0 will support CAS via Paxos. Presumably at a much,
> much lower throughput than the base system.
>
> https://issues.apache.org/jira/browse/CASSANDRA-5062
>

Thanks a lot for the pointers I will look at some of the solutions
described there.


>
> =Rob
>
>

Re: Distributed lock for cassandra

Posted by Robert Coli <rc...@eventbrite.com>.
On Mon, Aug 12, 2013 at 12:31 PM, srmore <co...@gmail.com> wrote:

> There are some operations that demand the use lock and I was wondering
> whether Cassandra has a built in locking mechanism. After hunting the web
> for a while it appears that the answer is no, although I found this
> outdated wiki page which describes the algorithm
> http://wiki.apache.org/cassandra/Locking was this implemented ?
>
> It would be great if people on the list can share their experiences / best
> practices about locking.
>

If your application needs a lot of locking, it is probably not ideal for a
distributed, log structured database with immutable data files.

That said, Cassandra 2.0 will support CAS via Paxos. Presumably at a much,
much lower throughput than the base system.

https://issues.apache.org/jira/browse/CASSANDRA-5062

=Rob