dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [dubbo-go] zouyx commented on a change in pull request #578: Rft : Optimize lock for zookeeper registry
Date Mon, 01 Jun 2020 07:55:00 GMT

zouyx commented on a change in pull request #578:
URL: https://github.com/apache/dubbo-go/pull/578#discussion_r433085328



##########
File path: remoting/zookeeper/client.go
##########
@@ -419,9 +419,7 @@ func (z *ZookeeperClient) CreateWithValue(basePath string, value []byte)
error {
 	for _, str := range strings.Split(basePath, "/")[1:] {
 		tmpPath = path.Join(tmpPath, "/", str)
 		err = errNilZkClientConn
-		z.Lock()
 		conn := z.Conn

Review comment:
        `conn := z.Conn` is atomic´╝îand no need to know the newest value.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Mime
View raw message