-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
feat: op-conductor strongly consistent reads #10619
feat: op-conductor strongly consistent reads #10619
Conversation
WalkthroughWalkthroughThe changes across the Changes
Recent Review DetailsConfiguration used: .coderabbit.yml Files selected for processing (3)
Files skipped from review due to trivial changes (1)
Files skipped from review as they are similar to previous changes (1)
Additional comments not posted (8)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
4a487b8
* op-conductor: add more logs for raft debugging * Add barrier * LatestUnsafePayload reads in a strongly consistent fashion * Atomic swap OpConductor.healthy * Fix conductor/service_test * Add test for when LatestUnsafePayload returns an error * Update some method comments --------- Co-authored-by: Francis Li <francis.li@coinbase.com>
* op-conductor: add more logs for raft debugging * Add barrier * LatestUnsafePayload reads in a strongly consistent fashion * Atomic swap OpConductor.healthy * Fix conductor/service_test * Add test for when LatestUnsafePayload returns an error * Update some method comments --------- Co-authored-by: Francis Li <francis.li@coinbase.com>
Description
Adds a
raft.Barrier
call toRaftConsensus.LatestUnsafePayload()
to ensure that the latest unsafe payload is always read in a strongly consistent fashion. With this change, both writes (CommitUnsafePayload
) and reads (LatestUnsafePayload
) depend on the leader's fully-applied FSM, ensuring that a change in leadership does not result in an accidental rollback to a previous head value.Tests
Added a basic raft_fsm test for the
Snapshot
method, and refactored the other raft_fsm tests to better evaluate state changes. This does not (yet) include any tests validating the change of read consistency.