chickenlj commented on code in PR #2437:
URL: https://github.com/apache/dubbo-go/pull/2437#discussion_r1354521525


##########
registry/zookeeper/service_discovery.go:
##########
@@ -64,17 +64,18 @@ type zookeeperServiceDiscovery struct {
 
 // newZookeeperServiceDiscovery the constructor of newZookeeperServiceDiscovery
 func newZookeeperServiceDiscovery(url *common.URL) (registry.ServiceDiscovery, 
error) {
+       rp := url.GetParam(constant.ZookeeperRootPath, rootPath)

Review Comment:
   The java implementation checked both rootPath and group. Maybe for some 
legacy consideration, for dubbogo, I personally think simplify check group is 
enough for RegistryConfig.group is designed for this scenario.
   
   ```java
    public static String getRootPath(URL registryURL) {
           String group = ROOT_PATH.getParameterValue(registryURL);
           if (group.equalsIgnoreCase(DEFAULT_GROUP)) {
               group = GROUP_PATH.getParameterValue(registryURL);
               if (!group.startsWith(PATH_SEPARATOR)) {
                   group = PATH_SEPARATOR + group;
               }
           }
           return group;
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to