You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by jo...@apache.org on 2021/06/18 06:36:12 UTC
[dubbo-go] branch 1.5 updated: fix
This is an automated email from the ASF dual-hosted git repository.
joezou pushed a commit to branch 1.5
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/1.5 by this push:
new 49f8c5e fix
new b195b50 Merge pull request #1263 from LaurenceLiZhixin/Fix/zkname-1.5
49f8c5e is described below
commit 49f8c5ec3a4cd1e76f0e03ee8119baf7acf9a24c
Author: LaurenceLiZhixin <38...@qq.com>
AuthorDate: Fri Jun 18 01:19:07 2021 +0800
fix
---
registry/zookeeper/registry.go | 7 +------
registry/zookeeper/service_discovery.go | 7 +------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go
index f67f984..3b07648 100644
--- a/registry/zookeeper/registry.go
+++ b/registry/zookeeper/registry.go
@@ -40,11 +40,6 @@ import (
"github.com/apache/dubbo-go/remoting/zookeeper"
)
-const (
- // RegistryZkClient zk client name
- RegistryZkClient = "zk registry"
-)
-
func init() {
extension.SetRegistry("zookeeper", newZkRegistry)
}
@@ -74,7 +69,7 @@ func newZkRegistry(url *common.URL) (registry.Registry, error) {
}
r.InitBaseRegistry(url, r)
- err = zookeeper.ValidateZookeeperClient(r, RegistryZkClient)
+ err = zookeeper.ValidateZookeeperClient(r, url.Location)
if err != nil {
return nil, err
}
diff --git a/registry/zookeeper/service_discovery.go b/registry/zookeeper/service_discovery.go
index 1b04322..6562628 100644
--- a/registry/zookeeper/service_discovery.go
+++ b/registry/zookeeper/service_discovery.go
@@ -44,11 +44,6 @@ import (
"github.com/apache/dubbo-go/remoting/zookeeper/curator_discovery"
)
-const (
- // RegistryZkClient zk client name
- ServiceDiscoveryZkClient = "zk service discovery"
-)
-
var (
// 16 would be enough. We won't use concurrentMap because in most cases, there are not race condition
instanceMap = make(map[string]registry.ServiceDiscovery, 16)
@@ -108,7 +103,7 @@ func newZookeeperServiceDiscovery(name string) (registry.ServiceDiscovery, error
url: url,
rootPath: rootPath,
}
- err := zookeeper.ValidateZookeeperClient(zksd, ServiceDiscoveryZkClient)
+ err := zookeeper.ValidateZookeeperClient(zksd, url.Location)
if err != nil {
return nil, err
}