aboutsummaryrefslogtreecommitdiff
path: root/src/core/ext/filters/client_channel/lb_policy/round_robin
diff options
context:
space:
mode:
authorMark D. Roth <roth@google.com>2018-04-27 11:44:07 -0700
committerMark D. Roth <roth@google.com>2018-04-27 11:44:07 -0700
commitd143bc345ed9caebcec88c1cda9729198ae97a4c (patch)
tree8bc0d53bc0062eb0a33ccfe22d82e60d7b7b481d /src/core/ext/filters/client_channel/lb_policy/round_robin
parent7d92def91561fba72d235281e832c3b2fa208bb0 (diff)
downloadgrpc-grpc-d143bc345ed9caebcec88c1cda9729198ae97a4c.tar.gz
Improve trace logging.
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy/round_robin')
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
index 1b17cbdd98..9d4f2842d1 100644
--- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
@@ -475,27 +475,25 @@ void RoundRobin::RoundRobinSubchannelList::
void RoundRobin::RoundRobinSubchannelData::UpdateConnectivityStateLocked(
grpc_connectivity_state connectivity_state, grpc_error* error) {
- subchannel_list()->UpdateStateCountersLocked(
- last_connectivity_state_, connectivity_state, GRPC_ERROR_REF(error));
- last_connectivity_state_ = connectivity_state;
-}
-
-void RoundRobin::RoundRobinSubchannelData::ProcessConnectivityChangeLocked(
- grpc_connectivity_state connectivity_state, grpc_error* error) {
RoundRobin* p = static_cast<RoundRobin*>(subchannel_list()->policy());
if (grpc_lb_round_robin_trace.enabled()) {
gpr_log(
GPR_INFO,
"[RR %p] connectivity changed for subchannel %p, subchannel_list %p "
- "(index %" PRIuPTR " of %" PRIuPTR
- "): prev_state=%s new_state=%s "
- "p->shutdown=%d sd->subchannel_list->shutting_down=%d error=%s",
+ "(index %" PRIuPTR " of %" PRIuPTR "): prev_state=%s new_state=%s",
p, subchannel(), subchannel_list(), Index(),
subchannel_list()->num_subchannels(),
grpc_connectivity_state_name(last_connectivity_state_),
- grpc_connectivity_state_name(connectivity_state), p->shutdown_,
- subchannel_list()->shutting_down(), grpc_error_string(error));
+ grpc_connectivity_state_name(connectivity_state));
}
+ subchannel_list()->UpdateStateCountersLocked(
+ last_connectivity_state_, connectivity_state, GRPC_ERROR_REF(error));
+ last_connectivity_state_ = connectivity_state;
+}
+
+void RoundRobin::RoundRobinSubchannelData::ProcessConnectivityChangeLocked(
+ grpc_connectivity_state connectivity_state, grpc_error* error) {
+ RoundRobin* p = static_cast<RoundRobin*>(subchannel_list()->policy());
GPR_ASSERT(subchannel() != nullptr);
// If the new state is TRANSIENT_FAILURE, re-resolve.
// Only do this if we've started watching, not at startup time.