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

kv: extract etcd/raft utilities into raftutil library #82797

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

nvanbenschoten
Copy link
Member

Commit pulled from #82758.

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.

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.
@nvanbenschoten nvanbenschoten requested a review from a team as a code owner June 12, 2022 15:55
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@knz knz left a 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: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @irfansharif)

Copy link
Contributor

@erikgrinaker erikgrinaker left a 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.

@nvanbenschoten
Copy link
Member Author

TFTRs!

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 13, 2022

Build failed:

@nvanbenschoten
Copy link
Member Author

Service 'kdc' failed to build: Head "https://registry-1.docker.io/v2/library/alpine/manifests/3.14": received unexpected HTTP status: 500 Internal Server Error

Docker hub flake.

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 13, 2022

This PR was included in a batch that was canceled, it will be automatically retried

@craig
Copy link
Contributor

craig bot commented Jun 13, 2022

Build succeeded:

@craig craig bot merged commit 0e5927a into cockroachdb:master Jun 13, 2022
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten/raftutil branch June 21, 2022 13:32
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.

5 participants