We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请简单描述bug的场景 config 设置 IP 为 ConfigService 集群中其中一个节点的 IP;停止该节点 ConfigService 后,SDK 负载均衡不会切换到其他节点。
如何重现
func TestRun(t *testing.T) { var ch = make(chan int, 0) _, err := StartWithConfig(func() (*config.AppConfig, error) { return &config.AppConfig{ AppID: "test-app", Cluster: "default", NamespaceName: "application", IP: "http://IP1", Secret: "xxx", }, nil }) if err != nil { panic(err) } <-ch }
再现行为的步骤:
期望 负载均衡切换到其他节点
其他上下文
RequestRecovery 里判断 host == appConfig.GetHost() 直接返回了,SetDownNode 里的 s.nextTryConnTime = nextTryConnectPeriod 应该不会生效,导致 IsConnectDirectly 永远返回 false,loadBalance 方法一直使用 appConfig 里的配置,而不是通过 services/config 获取的节点列表。
host == appConfig.GetHost()
s.nextTryConnTime = nextTryConnectPeriod
IsConnectDirectly
loadBalance
services/config
server.SetDownNode(host, appConfig.GetHost()),这里参数传递是否写反了,SetDownNode 里使用第一个参数去获取 Server 列表,所以我理解第一个参数应该传入 appConfig.GetHost() 才对
server.SetDownNode(host, appConfig.GetHost())
SetDownNode
appConfig.GetHost()
The text was updated successfully, but these errors were encountered:
zouyx
Successfully merging a pull request may close this issue.
请简单描述bug的场景
config 设置 IP 为 ConfigService 集群中其中一个节点的 IP;停止该节点 ConfigService 后,SDK 负载均衡不会切换到其他节点。
如何重现
再现行为的步骤:
期望
负载均衡切换到其他节点
其他上下文
RequestRecovery 里判断
host == appConfig.GetHost()
直接返回了,SetDownNode 里的s.nextTryConnTime = nextTryConnectPeriod
应该不会生效,导致IsConnectDirectly
永远返回 false,loadBalance
方法一直使用 appConfig 里的配置,而不是通过services/config
获取的节点列表。server.SetDownNode(host, appConfig.GetHost())
,这里参数传递是否写反了,SetDownNode
里使用第一个参数去获取 Server 列表,所以我理解第一个参数应该传入appConfig.GetHost()
才对The text was updated successfully, but these errors were encountered: