From ea68d72c181909ea35c6407b5ecf68f549f396b5 Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Tue, 10 Nov 2020 16:03:29 -0800 Subject: [PATCH] [roundrobin_strips_attributes] c0 --- balancer/base/balancer.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/balancer/base/balancer.go b/balancer/base/balancer.go index d387c5032d86..bdcc81af36d0 100644 --- a/balancer/base/balancer.go +++ b/balancer/base/balancer.go @@ -130,8 +130,11 @@ func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error { sc.Connect() } else { // Always update the subconn's address in case the attributes - // changed. This is a noop if the current address is the same as the - // old one (reflect.DeepEqual). + // changed. + // + // The SubConn does a reflect.DeepEqual of the new and old + // addresses. So this is a noop if the current address is the same + // as the old one (including attributes). // // TODO: delete this when this balancer reads attributes. sc.UpdateAddresses([]resolver.Address{a})