Merge pull request #17131 from AspirinSJL/grpclb_fallback_fix

Update the RR policy even when fallback mode is disabled
pull/17193/head
Juanli Shen 6 years ago committed by GitHub
commit 2b568d2027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc

@ -1333,11 +1333,8 @@ void GrpcLb::ProcessChannelArgsLocked(const grpc_channel_args& args) {
void GrpcLb::UpdateLocked(const grpc_channel_args& args) { void GrpcLb::UpdateLocked(const grpc_channel_args& args) {
ProcessChannelArgsLocked(args); ProcessChannelArgsLocked(args);
// If fallback is configured and the RR policy already exists, update // Update the existing RR policy.
// it with the new fallback addresses. if (rr_policy_ != nullptr) CreateOrUpdateRoundRobinPolicyLocked();
if (lb_fallback_timeout_ms_ > 0 && rr_policy_ != nullptr) {
CreateOrUpdateRoundRobinPolicyLocked();
}
// Start watching the LB channel connectivity for connection, if not // Start watching the LB channel connectivity for connection, if not
// already doing so. // already doing so.
if (!watching_lb_channel_) { if (!watching_lb_channel_) {

Loading…
Cancel
Save