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

Benedict Elliott Smith commented on CASSANDRA-17162:
----------------------------------------------------

Thanks for your patch. Unfortunately these sorts of blog posts are not 
generalisable, and you need to consider the specific application you're 
addressing. This particular example is not a bug in Cassandra, due to the use 
of ballot timestamps when persisting paxos state data. While replica C will 
nominally accept proposal _a_, the proposal _b_ will not be overwritten by this 
action, so the proposal _b_ is not forgotten at node C, and therefore no 
problem arises. Future promises will report _b_ as incomplete, until it 
commits, and _a_ cannot replace it as a decision, nor can it be accepted at any 
quorum, so it never proceeds to the commit phase.

This work is all being overhauled in the near future by CEP-14, a patch for 
which will be posted hopefully this week. This work will anyway begin directly 
referencing both the in progress, proposal and committed registers when 
determining if a promise should be issued or a proposal accepted, so that this 
will be more obviously correct.

> In the paxos implementation, a delayed proposal might overwrite newer values
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17162
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17162
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Unmesh Joshi
>            Priority: Normal
>         Attachments: paxos-fix.patch
>
>
> I was going through this blog post , which talks about a possible bug in 
> paxos implementation if in-progress ballot is not set while accepting a 
> proposal.
> [https://brooker.co.za/blog/2021/11/16/paxos.html]
> I tried writing a failing test and possible fix. 
> The in_progress_ballot needs to be set when accepting a proposal. The current 
> implementation sets only the proposal_ballot when accepting a proposal.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to