[ 
https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593553#comment-13593553
 ] 

Sylvain Lebresne commented on CASSANDRA-5062:
---------------------------------------------

{quote}
So looking at your proposer algorithm where you do:
send(LEARN(C_new));
This can succeed on the lead replica (locally assuming you're using one of the 
replicas as lead) but fail on all or some of the others.
{quote}
Sure it can. But it doesn't matter. It's indeed possible for one proposer to 
accept/commit/learn multiple rounds while being the only one actually getting 
the learn. That's not a problem in itself. The point being, if another replica 
(say X at the end of your example) start proposing, it will not do in in round 
3, because it has not learn about that round yet. It will try round 1. At which 
point, either Z is part of the quorum that agree on his message, and X will get 
an abort with the round 3 value, that it will apply and then propose on round 
4; or Z is not part of said quorum, but then paxos guarantee that X will end up 
learning the exact same value Z learned for round 1 (because that quorum of 
replica hasn't erased his paxos state for round 1 since erasure is done on 
reception of learn, but they haven't learned (if they do have learned, we're in 
the Z case where ABORT is sent)).
                
> Support CAS
> -----------
>
>                 Key: CASSANDRA-5062
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5062
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>             Fix For: 2.0
>
>         Attachments: half-baked commit 1.jpg, half-baked commit 2.jpg, 
> half-baked commit 3.jpg
>
>
> "Strong" consistency is not enough to prevent race conditions.  The classic 
> example is user account creation: we want to ensure usernames are unique, so 
> we only want to signal account creation success if nobody else has created 
> the account yet.  But naive read-then-write allows clients to race and both 
> think they have a green light to create.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to