grpc / grpc-go

The Go language implementation of gRPC. HTTP/2 based RPC

Home Page:https://grpc.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resolver.Address's BalancerAttributes update will not reflect in Balancer

LeGamerDc opened this issue · comments

base.Balancer ignores BalanceAttributes update because it see seem subconn address then not modify its BalancerAttributes.

@LeGamerDc can you explain in more detail what you're trying to do?

@dfawley yes, im implement a migrating mechanic. server have some states, and when it go to MIGRATING state, it notify to grpc client through BalancerAttributes, when client know a server is in MIGRATING state, client no longer assign new key to it, and server should shutdown keys one by one.

commonly, if server want to tell client some information about balance strategy, it seems BalancerAttributes is the best choice. and no matter what it tells, grpc should not ignores or rebuild SubConn(if put in Attributes).

i found solution however, write another Balancer is ok.

i found solution however, write another Balancer is ok.

I'm glad you found something that works. If you're still having trouble, then please let us know even more details - what LB policy/policies you're using, what exactly is happening in your code, what you are seeing, and what you are expecting to see.