Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport: Fix serial read/non-applying CAS linearizability #481

Draft
wants to merge 1 commit into
base: palantir-cassandra-2.2.18
Choose a base branch
from

Conversation

wi11dey
Copy link
Contributor

@wi11dey wi11dey commented Apr 21, 2024

Before this patch, a SERIAL read or a non-applying CAS replay any
in-progress commit by calling `beginAndRepairPaxos`, but only a quorum
of nodes is contacted, so a minority of nodes could have an unfinished
in-progress proposal in their Paxos state. If such in-progress proposal
is not replayed by a SERIAL read/non-applying CAS, it should never be
replayed by any following operation as that would break serializability,
but nothing was done to avoid this.

This patch ensures that both a SERIAL read or a non-applying CAS commit
an empty update before succeeding. This ensures that no prior incomplete
in-progress proposal can be replayed (such proposal will be discarded as
older than the last committed ballot).

As this fix has a performance impact on SERIAL reads, a flag is provided
to disable the new code (even if this is discouraged by a warning).

Patch by Sylvain Lebresne, reviewed by Benjamin Lerer for CASSANDRA-12126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants