Remove error from connectivity state tracking.#18628
Conversation
54597ce to
2e44fe0
Compare
2e44fe0 to
b315382
Compare
AspirinSJL
left a comment
There was a problem hiding this comment.
Does this mean that we were actually not using this error before?
Reviewed 17 of 17 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @apolcyn and @markdroth)
src/core/ext/filters/client_channel/resolving_lb_policy.cc, line 124 at r1 (raw file):
void UpdateState(grpc_connectivity_state state, UniquePtr<SubchannelPicker> picker) override { if (parent_->resolver_ == nullptr) {
The bracket can be removed.
If the comment is kept, we still save one line.
markdroth
left a comment
There was a problem hiding this comment.
It was never used for anything but human debugging. The main thing that changes in this PR is that we're no longer going to see the error message when the connectivity_state tracer is enabled. But since we will see the error message when the individual calls fail, I think that's okay.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @apolcyn)
src/core/ext/filters/client_channel/resolving_lb_policy.cc, line 124 at r1 (raw file):
Previously, AspirinSJL (Juanli Shen) wrote…
The bracket can be removed.
If the comment is kept, we still save one line.
It's generally considered a bad idea to have the body of an "if" statement be on its own line but not be surrounded by braces. This can lead to problems where a merge will incorrectly duplicate the body line with disasterous results, like the problem that Apple suffered in its SSL code a few years back:
https://embeddedgurus.com/barr-code/2014/03/apples-gotofail-ssl-security-bug-was-easily-preventable/
But I've changed it to fit the body on the same line with the condition, so this issue is moot.
AspirinSJL
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @apolcyn)
src/core/ext/filters/client_channel/resolving_lb_policy.cc, line 124 at r1 (raw file):
Previously, markdroth (Mark D. Roth) wrote…
It's generally considered a bad idea to have the body of an "if" statement be on its own line but not be surrounded by braces. This can lead to problems where a merge will incorrectly duplicate the body line with disasterous results, like the problem that Apple suffered in its SSL code a few years back:
https://embeddedgurus.com/barr-code/2014/03/apples-gotofail-ssl-security-bug-was-easily-preventable/
But I've changed it to fit the body on the same line with the condition, so this issue is moot.
Yeah, in my hazy memory there is a story about merge like this. Thanks for the pointer!
54f40a3 to
432c97e
Compare
It doesn't seem to add any benefit to track the error with the connectivity state, since we already report the same error for individual RPCs that fail while we are in state TRANSIENT_FAILURE. Removing this unnecessary complexity removes yet another internal API from the LB policy API.
This change is