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

codewide: Allow setting Serial,LocalSerial for Consistency #792

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

wprzytula
Copy link
Collaborator

Motivation

See #736.

What's done

  • Consistency is extended with Serial and LocalSerial to support reading using Paxos (SELECT statements),
  • LegacyConsistency is removed altogether,
  • a test is added that performs such a Paxos read.

Fixes: #736

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have provided docstrings for the public items that I want to introduce.
  • [ ] I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

Copy link
Collaborator

@piodul piodul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One request, otherwise LGTM.

scylla-cql/src/frame/types.rs Show resolved Hide resolved
It appears that, contrary to what we thought, LocalSerial and Serial
are also valid values for Consistency in some cases: for LWT SELECTs.
Therefore, Consistency is extended with Serial and LocalSerial variants,
and LegacyConsistency is removed as no longer making sense.
The test stays there to assert that it is expressible and possible to
perform such a query. Before, Consistency did not contain serial
variants, so it used to not be feasible, even though supported by
Scylla.
@wprzytula
Copy link
Collaborator Author

  • implemented thiserror::Error as requested,
  • rebased.

@piodul piodul merged commit 0845531 into scylladb:main Aug 22, 2023
8 checks passed
@wprzytula wprzytula deleted the consistency-allows-serial branch August 22, 2023 11:00
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.

Enable setting LocalSerial, Serial as Consistency
3 participants