Re: Usage Pattern : "unique" value of a key.

2011-01-13 Thread Benoit Perroud
Thanks for your answer. You're right when you say it's unlikely that 2 threads have the same timestamp, but it can. So it could work for user creation, but maybe not on a more write intensive problem. Moreover, we cannot rely on fully time synchronized node in the cluster (but on node synchronize

Re: Usage Pattern : "unique" value of a key.

2011-01-13 Thread David Boxenhorn
"It is unlikely that both racing threads will have exactly the same microsecond timestamp at the moment of creating a new user - so if data you read have exactly the same timestamp you used to write data - this is your data." I think this would have to be combined with CL=QUORUM for both write and

Re: Usage Pattern : "unique" value of a key.

2011-01-12 Thread Oleg Anastasyev
Benoit Perroud noisette.ch> writes: > > My idea to solve such use case is to have both thread writing the > username, but with a colum like "lock-", and then read > the row, and find out if the first lock column appearing belong to the > thread. If this is the case, it can continue the process,

Usage Pattern : "unique" value of a key.

2011-01-12 Thread Benoit Perroud
Hi ML, I wonder if someone has already experiment some kind of unique index on a column family key. Let's go for a short example : the key is the username. What happens if 2 users want to signup at the same time with the same username ? So has someone already addressed this "pattern" in Cassandr