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

raft: remove unused read-only requests #120613

Merged
merged 2 commits into from
Apr 9, 2024
Merged

Conversation

pav-kv
Copy link
Collaborator

@pav-kv pav-kv commented Mar 17, 2024

This PR removes the read-only requests from pkg/raft. We don't use them in CRDB, and the leases implementation is known to be incorrect (e.g. see etcd-io/raft#166 and etcd-io/etcd#10082).

Epic: none
Release note: none

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@pav-kv pav-kv force-pushed the rm-read-only branch 4 times, most recently from 5cdef50 to 8a367c9 Compare March 17, 2024 23:08
@pav-kv pav-kv force-pushed the rm-read-only branch 2 times, most recently from fc2b600 to 449f9d1 Compare April 8, 2024 13:36
@pav-kv pav-kv marked this pull request as ready for review April 8, 2024 13:37
@pav-kv pav-kv requested review from a team and nvanbenschoten April 8, 2024 13:37
Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

Reviewed 14 of 14 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @pav-kv)


-- commits line 8 at r2:
Does this allow us to delete the Context field from the Message proto?


pkg/raft/raftpb/raft.proto line 69 at r1 (raw file):

	// raft/util_test.go.

  reserved 15, 16; // used to be MsgReadIndex(Resp)

nit: tab to align with above.

Epic: none
Release note: none
Epic: none
Release note: none
Copy link
Collaborator Author

@pav-kv pav-kv left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @pav-kv)


-- commits line 8 at r2:

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

Does this allow us to delete the Context field from the Message proto?

This field is still used by other bits, e.g. by leader transfers:

r.send(pb.Message{To: id, Term: term, Type: voteMsg, Index: last.index, LogTerm: last.term, Context: ctx})
.


pkg/raft/raftpb/raft.proto line 69 at r1 (raw file):

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

nit: tab to align with above.

Done.

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @pav-kv)

@pav-kv
Copy link
Collaborator Author

pav-kv commented Apr 9, 2024

bors r=nvanbenschoten

@craig craig bot merged commit e9d1b46 into cockroachdb:master Apr 9, 2024
22 checks passed
@pav-kv pav-kv deleted the rm-read-only branch April 9, 2024 19:09
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.

3 participants