Re: Locking in cassandra

2010-08-16 Thread Benjamin Black
This is the locking implementation: http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/NotImplementedException.html And you might benefit from reading these: http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html http://www.slideshare.net/benjaminblack/introduction-to-cassan

Re: Locking in cassandra

2010-08-16 Thread Ryan King
On Mon, Aug 16, 2010 at 6:07 AM, Maifi Khan wrote: > Hi > How is the locking implemented in cassandra? Say, I have 10 nodes and > I want to write to 6 nodes which is (n+1)/2. Not to be too pedantic, but you're misunderstanding how to use cassandra. When we talk about 'n' we mean the number of rep

Re: Locking in cassandra

2010-08-16 Thread Nick Telford
Hi Maifi, This is the expected behaviour for updating a value - the "newest" value always wins in the event of a conflict (e.g. after two partitions converge). Your use case is that of incrementing counters, which is not something that is easily solved in Cassandra at the moment. There are issue

Re: Locking in cassandra

2010-08-16 Thread Maifi Khan
Hi Gary Thanks for your reply. Say, I am keeping track of total expenditure . Say, at time t, the value was 100. Now, at t+1, say my 10 node network got partitioned and become two disjoint set S1 (node 1,2,3,4,5,)and S2 (node 6,7,8,9,10). 1) At time t+2: For incoming value 20 , it uses set S1 and

Re: Locking in cassandra

2010-08-16 Thread Gary Dusbabek
>From a cluster perspective there is no locking, atomicity or isolation. In your example, 5 nodes may be written to and if a 6th write doesn't happen, the write is failed, but the 5 writes that happened stay. The code is in two places. StorageProxy.mutate (and mutateBlocking) is where the local

Locking in cassandra

2010-08-16 Thread Maifi Khan
Hi How is the locking implemented in cassandra? Say, I have 10 nodes and I want to write to 6 nodes which is (n+1)/2. Will it lock 6 nodes first and then start writing? Or will it write one by one and see if it can write to 6 nodes. How is this implemented? What package does this locking? Thanks in