In picker logic(picker_wrapper.go), clearly understand the real reason for failures after a context.Error(timeout)
holdno opened this issue · comments
Line 153 in a2f8e61
Should we consider setting the error content for lastPickErr so that clients can clearly understand the real reason for failures after a timeout? This might improve troubleshooting and user experience.
if err == balancer.ErrNoSubConnAvailable {
lastPickErr = err
continue
}
Hi @holdno, can you please share your findings on running your code?
If the server-side balancer picks balancer.ErrNoSubConnAvailable, the gRPC picking logic will cause the context (ctx) to block until it times out. As a result, from the client's perspective, it appears as if there is a server response timeout, without knowing that it is due to NoSubConnAvailable.
What kind of code execution results do you need me to provide? Could you give an example or refer to another issue? Alternatively, I could submit the changes as a PR.
Thank you.