WRR: add trace message when updating scheduler (#32534)

This will help detect when we fall back to RR.
pull/32542/head
Mark D. Roth 2 years ago committed by GitHub
parent db62c06171
commit 5c1351883e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc

@ -560,6 +560,13 @@ void WeightedRoundRobin::Picker::BuildSchedulerAndStartTimerLocked() {
if (scheduler_or.has_value()) {
scheduler =
std::make_shared<StaticStrideScheduler>(std::move(*scheduler_or));
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_wrr_trace)) {
gpr_log(GPR_INFO, "[WRR %p picker %p] new scheduler: %p", wrr_.get(),
this, scheduler.get());
}
} else if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_wrr_trace)) {
gpr_log(GPR_INFO, "[WRR %p picker %p] no scheduler, falling back to RR",
wrr_.get(), this);
}
{
MutexLock lock(&scheduler_mu_);

Loading…
Cancel
Save