incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: Curious as to how Cassandra handles the following
Date Sun, 26 Sep 2010 18:48:13 GMT
To be more clear (maybe I was not before). BatchMutate is not atomic.
So it only "batch up" mutates to reduce overhead. So it can be that
you will receive data from it even if the whole operation is not
complete or will not complete.

bye,
Norman


2010/9/26 Norman Maurer <norman@apache.org>:
> Comments inside..
>
> 2010/9/26 Lucas Nodine <lucasnodine@gmail.com>:
>> I'm looking at a design where multiple clients will connect to Cassandra and
>> get/mutate resources, possibly concurrently.  After planning a bit, I ran
>> into the following scenero for which I have not been able to research to
>> find an answer sufficient for my needs.  I have found where others have
>> recommended Zookeeper for such tasks, but I want to determine if there is a
>> simple solution before including another product in my design.
>>
>> Make the following assumption for all following situations:
>> Assuming multiple clients where a client is someone accessing Cassandra
>> using thrift.  All reads and writes are performed using the QUORUM
>> consistency level.
>>
>> Situation 1:
>> Client A ("A") connects to Cassandra and requests a QUORUM consistency level
>> get of an entire row.  At or very shortly thereafter (before A's request
>> completes), Client B ("B") connects to Cassandra and inserts (or mutates) a
>> column (or multiple columns) within the row.
>>
>> Does A receive the new data saved by B or does A receive the data prior to
>> B's save?
>
> Shoud receive A stuff.
>>
>> Situaton 2:
>> B connects and mutates multiple columns within a row.  A requests some data
>> therein while B is processing.
>>
>> Result?
>
> Depends.. is it done in BatchMutate or not ?
>
>>
>> Situation 3:
>> B mutates multiple columns within multiple rows.  A requests some data
>> therein while B is processing.
>>
>> Result?
>
> See above..
>
>>
>> Justification: At certain points I want to essentially lock a resource (row)
>> in cassandra for exclusive write access (think checkout a resource) by
>> setting a flag value of a column within that row.  I'm just considering race
>> conditions.
>>
> You will need to use cages or something like that..
>
>
>> Thanks,
>>
>> Lucas Nodine
>
> Bye,
> Norman
>

Mime
View raw message