justxuewei commented on code in PR #1898:
URL: https://github.com/apache/dubbo-go/pull/1898#discussion_r884352924


##########
registry/etcdv3/registry.go:
##########
@@ -137,15 +132,14 @@ func (r *etcdV3Registry) CloseListener() {
 
 // CreatePath create the path in the registry center of etcd
 func (r *etcdV3Registry) CreatePath(k string) error {
-       var tmpPath string
-       for _, str := range strings.Split(k, "/")[1:] {
-               tmpPath = path.Join(tmpPath, "/", str)
-               if err := r.client.Create(tmpPath, ""); err != nil {
-                       return perrors.WithMessagef(err, "create path %s in 
etcd", tmpPath)
-               }
-       }
-
-       return nil
+       //var tmpPath string
+       //for _, str := range strings.Split(k, "/")[1:] {
+       //      tmpPath = path.Join(tmpPath, "/", str)
+       //      if err := r.client.Put(tmpPath, ""); err != nil {
+       //              return perrors.WithMessagef(err, "create path %s in 
etcd", tmpPath)
+       //      }
+       //}
+       return perrors.WithMessagef(r.client.Put(k, ""), "create path %s in 
etcd", k)

Review Comment:
   If the above code is useless, please remove it instead of comment it.



-- 
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