-
Notifications
You must be signed in to change notification settings - Fork 4k
core: check version compatibility on RPC handshake #20587
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
Conversation
97eb2c0 to
d48b748
Compare
|
Reviewed 33 of 33 files at r1. pkg/rpc/heartbeat.go, line 65 at r1 (raw file):
s/server/peer/ pkg/rpc/heartbeat_test.go, line 226 at r1 (raw file):
What's the difference between this test and the similar one in context_test.go? (comments would be nice) Comments from Reviewable |
|
Reviewed 33 of 33 files at r1. pkg/rpc/context.go, line 585 at r1 (raw file):
The wording of the "but peer has version" error message is ambiguous depending on where it's returned from. If it's evaluated on the server and returned by Could you disambiguate the situation in some way so that we don't get stuck wondering which server was at the bad version in a debugging scenario where we only have the logs to go by? Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. pkg/rpc/context.go, line 585 at r1 (raw file): Previously, a-robinson (Alex Robinson) wrote…
Good point. I wrapped the error to indicate if it's on the request or response side. Hopefully that's sufficient. pkg/rpc/heartbeat.go, line 65 at r1 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Done. pkg/rpc/heartbeat_test.go, line 226 at r1 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Yup, added comments. They test similar logic but at different levels. Basically this one tests the handler side of the heartbeat and the other tests the request side. I would have only added this test except that I needed to verify that the check was bidirectional. Hopefully the new comments make this clearer. Comments from Reviewable |
d48b748 to
7f9d4cf
Compare
|
👍 Reviewed 5 of 5 files at r2. Comments from Reviewable |
|
Update to fix acceptance tests: I added a Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks pending. Comments from Reviewable |
The RPC heartbeat now checks for version compatibility between the two nodes. This prevents a node from establishing a gRPC connection if its binary version is lower than the cluster version on the other end. Fixes cockroachdb#18058 Release note (bug fix): Prevent RPC connections between nodes with incompatible versions.
7f9d4cf to
81254fc
Compare
The RPC heartbeat now checks for version compatibility between the two
nodes. This prevents a node from establishing a gRPC connection if its
binary version is lower than the cluster version on the other end.
Fixes #18058.
Release note (bug fix): Prevent RPC connections between nodes with
incompatible versions.