-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
kv: extract etcd/raft utilities into raftutil library #82797
kv: extract etcd/raft utilities into raftutil library #82797
Conversation
This commit extracts some scattered logic to interpret the state of an etcd/raft Status into a new `raftutil` library. The library initially has two functions: `ReplicaIsBehind` and `ReplicaMayNeedSnapshot`. In the future, I expect that we'll extract more helper functions that make working with etcd/raft easier into this library.
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.
Nice refactor.
Reviewed 13 of 13 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @irfansharif)
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.
Appreciate the extra tests too.
TFTRs! bors r+ |
Build failed: |
Docker hub flake. bors r+ |
This PR was included in a batch that was canceled, it will be automatically retried |
Build succeeded: |
Commit pulled from #82758.
This commit extracts some scattered logic to interpret the state of an
etcd/raft
Status into a newraftutil
library. The library initially has two functions:ReplicaIsBehind
andReplicaMayNeedSnapshot
. In the future, I expect that we'll extract more helper functions that make working withetcd/raft
easier into this library.