cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6013) CAS may return false but still commit the insert
Date Thu, 12 Sep 2013 17:48:52 GMT

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

Jonathan Ellis commented on CASSANDRA-6013:
-------------------------------------------

bq. if for a given proposal at least one accepter has accepted it but not a quorum does, then
that value might (but that's not guaranteed either) be replayed (and committed) by another
proposer

Why not have the new leader require a quorum of replicas to say "I have this unfinished business"
before replaying it?

(I'm pretty sure I had this logic in originally but you talked me out of it in the name of
code simplification.)
                
> CAS may return false but still commit the insert
> ------------------------------------------------
>
>                 Key: CASSANDRA-6013
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6013
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sylvain Lebresne
>
> If a Paxos proposer proposes some value/update and that propose fail, there is no guarantee
on whether this value will be accepted or not ultimately. Paxos guarantees that we'll agree
on "a" value (for a given round in our case), but does not guarantee that the proposer of
the agreed upon value will know it.  In particular, if for a given proposal at least one accepter
has accepted it but not a quorum does, then that value might (but that's not guaranteed either)
be replayed (and committed) by another proposer.
> Currently, if a proposer A proposes some update U but it is rejected, A will sleep a
bit and retry U. But if U was accepted by at least one acceptor, some other proposer B might
replay U, succeed and commit it. If A does its retry after that happens, he will prepare,
check the condition, and probably find that the conditions don't apply anymore since U has
been committed already. It will thus return false, even though U has been in fact committed.
> Unfortunately I'm not sure there is an easy way for a proposer whose propose fails to
know if the update will prevail or not eventually. Which mean the only acceptable solution
I can see would be to return to the user "I don't know" (through some exception for instance).
Which is annoying because having a proposal rejected won't be an extremely rare occurrence,
even with relatively light contention, and returning "I don't know" often is a bit unfriendly.

--
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

Mime
View raw message