[ https://issues.apache.org/jira/browse/CASSANDRA-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620253#comment-13620253 ]
Jonathan Ellis commented on CASSANDRA-5062: ------------------------------------------- bq. One option could be to ensure that a quorum of node has learned before starting a new round Right. But I don't think keeping the last commit value fixes this for the general case, since a replica can miss arbitrarily many updates while the other two nodes are the quorum. We could hint the commit, but that doesn't help since the next CAS request could go to a different coordinator. So I think we'd have to hint to one of the other replicas, and have the replica include whether it has un-replayed hints for its peers in the promise (and disqualify the target from the quorum until it does get replayed). But that still leaves a window for all the replicas to become unavailable to the coordinator between (partial) learn, and hint generation. We could use a batchlog-like approach, where each peer generates a hint precursor that it will turn into an actual hint if it doesn't get the all-clear from the coordinator in time. (I think we might even be able to use the actual batchlog code here.) Performance might even be acceptable, judging from the batchlog precedent... This is definitely messy though. Better ideas? > 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