You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG REPORT Please add the branch name [Native]/[Master] at the header of the Isssue title.
Please describe the issue you observed:
When concurrent UpdateNameServerAddress and getNameServerAddress, because namesrvs.srvs has changed, and namesrvs.index is not adjusted accordingly, the execution of "s.srvs[s.index]" causes the array to out of range
Please tell us about your environment:
rocketmq-client-go: v2.1.0-rc4 and master
Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
panic: runtime error: index out of range [5] with length 5
goroutine 257 [running]:
github.com/apache/rocketmq-client-go/v2/internal.(*namesrvs).getNameServerAddress(0xc000c92240, 0x0, 0x0)
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/namesrv.go:123 +0x16d
github.com/apache/rocketmq-client-go/v2/internal.(*namesrvs).queryTopicRouteInfoFromServer(0xc000c92240, 0xc000eb9580, 0x31, 0x479ad0, 0xc00194ebe0, 0xc000760340)
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/route.go:355 +0x274
github.com/apache/rocketmq-client-go/v2/internal.(*namesrvs).UpdateTopicRouteInfoWithDefault(0xc000c92240, 0xc000eb9580, 0x31, 0x0, 0x0, 0x0, 0x0, 0xc000a7f200, 0x0, 0x0)
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/route.go:132 +0xcf
github.com/apache/rocketmq-client-go/v2/internal.(*namesrvs).UpdateTopicRouteInfo(...)
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/route.go:116
github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).UpdateTopicRouteInfo(0xc0007fe340)
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:527 +0x17d
github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).Start.func1.2.1(...)
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:292
github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).Start.func1.2()
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:302 +0x156
github.com/apache/rocketmq-client-go/v2/primitive.WithRecover(0xc000760430)
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/primitive/base.go:96 +0x49
created by github.com/apache/rocketmq-client-go/v2/internal.(*rmqClient).Start.func1
/go/pkg/mod/github.com/apache/rocketmq-client-go/[email protected]/internal/client.go:289 +0x10e
The text was updated successfully, but these errors were encountered:
BUG REPORT
Please add the branch name [Native]/[Master] at the header of the Isssue title.
Please describe the issue you observed:
Please tell us about your environment:
Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
The text was updated successfully, but these errors were encountered: