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
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
Benoit Perroud benoit at noisette.ch writes:
My idea to solve such use case is to have both thread writing the
username, but with a colum like lock-RANDOM VALUE, 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