dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [dubbo-go] AlexStocks commented on a change in pull request #578: Rft : Optimize lock for zookeeper registry
Date Tue, 02 Jun 2020 11:06:27 GMT

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



##########
File path: remoting/zookeeper/client.go
##########
@@ -487,7 +493,9 @@ func (z *ZookeeperClient) RegisterTempSeq(basePath string, data []byte)
(string,
 	)
 
 	err = errNilZkClientConn
+	z.RLock()

Review comment:
       big old, maybe u can define a func as follows
   
   ```Go
   func (z *zookeeperClient) getConn() net.Conn {
           z.RLock()
           defer z.RUnlock()
   
   	return z.Conn
   }




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