You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/12/02 05:25:54 UTC

[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #1629: avoid the problem of cpu idling & fix wrong definition of error

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



##########
File path: registry/zookeeper/listener.go
##########
@@ -71,17 +71,18 @@ func (l *RegistryDataListener) UnSubscribeURL(url *common.URL) config_center.Con
 }
 
 // DataChange accepts all events sent from the zookeeper server and trigger the corresponding listener for processing
-func (l *RegistryDataListener) DataChange(eventType remoting.Event) bool {
+func (l *RegistryDataListener) DataChange(event remoting.Event) bool {
 	// Intercept the last bit
-	index := strings.Index(eventType.Path, "/providers/")
+	index := strings.Index(event.Path, "/providers/")

Review comment:
       把 “ providers” 定义成 常量




-- 
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: notifications-unsubscribe@dubbo.apache.org

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