-
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
rpc: use the loopback conn also for GRPCDialOptions #103764
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
NB: this fix doesn't work, there's a remaining bug. I'm looking into it. |
ok this is ready |
For context, `rpc.GRPCDialOptions` is used in two cases: - when connecting to other nodes as specified by the `--join` flag. - in the grpc-gateway code, to route incoming HTTP requests to the RPC subsystem. The first one nearly always targets remotes nodes. The second one always targets the local node (it's a loopback connection). Prior to this patch, the 2 callers to `rpc.GRPCDialOptions` would be served the regular "remote network conn" dial options unconditionally, including the backoff, only-once-dialer and other parameters suitable to connect to other nodes remotely. While this choice is suitable for the `--join` logic, it's not suitable for the grpc-gateway loopback conn. In that case, we want to avoid all the network intelligence and especially avoid the only-once-dialer and circuit breaker. This patch ensures that grpc-gateway receives the loopback parameters properly. Release note (bug fix): A bug was fixed whereby under high CPU load, HTTP requests to certain API endpoints (e.g. the health endpoint) could start failing and then never succeed again until the node was restarted. This bug had been introduced in v23.1.
tbg
approved these changes
May 23, 2023
bors r=tbg |
Build succeeded: |
knz
added a commit
to knz/cockroach
that referenced
this pull request
Jun 27, 2023
We have fixed the issue that caused the skip in cockroachdb#103764. Release note: None
blathers-crl bot
pushed a commit
that referenced
this pull request
Jun 27, 2023
We have fixed the issue that caused the skip in #103764. Release note: None
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #103762.
Fixes #99261.
Fixes #103692.
Epic: CRDB-28893
For context,
rpc.GRPCDialOptions
is used in two cases:--join
flag.The first one nearly always targets remotes nodes. The second one always targets the local node (it's a loopback connection).
Prior to this patch, the 2 callers to
rpc.GRPCDialOptions
would be served the regular "remote network conn" dial options unconditionally, including the backoff, only-once-dialer and other parameters suitable to connect to other nodes remotely.While this choice is suitable for the
--join
logic, it's not suitable for the grpc-gateway loopback conn. In that case, we want to avoid all the network intelligence and especially avoid the only-once-dialer and circuit breaker.This patch ensures that grpc-gateway receives the loopback parameters properly.
Release note (bug fix): A bug was fixed whereby under high CPU load,
HTTP requests to certain API endpoints (e.g. the health endpoint)
could start failing and then never succeed again until the node was
restarted. This bug had been introduced in v23.1.