-
Notifications
You must be signed in to change notification settings - Fork 963
Closed
Description
Environment
- Server: Dubbo-go, v3.0.5
- Client: Dubbo-go, v3.0.5
- Protocol: dubbo
- Registry: Nacos, v1
Issue description
Nacos registry,Different namespaces represent different registry
eg. develop
、test
、product
http://122.32.33.4:6801/nacos?namespace=develop
http://122.32.33.4:6801/nacos?namespace=test
http://122.32.33.4:6801/nacos?namespace=product
registryUrl.PrimitiveURL all equals "registry://122.32.33.4:6801"
When the method getRegistry is called, it returns the same registry every time
func (proto *registryProtocol) getRegistry(registryUrl *common.URL) registry.Registry {
var err error
reg, loaded := proto.registries.Load(registryUrl.PrimitiveURL)
if !loaded {
reg, err = extension.GetRegistry(registryUrl.Protocol, registryUrl)
if err != nil {
logger.Errorf("Registry can not connect success, program is going to panic.Error message is %s", err.Error())
panic(err)
}
proto.registries.Store(registryUrl.PrimitiveURL, reg)
}
return reg.(registry.Registry)
}
Logs
Click me to check logs
Copy logs to here.
Metadata
Metadata
Assignees
Labels
No labels