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 2020/05/22 15:10:43 UTC

[GitHub] [dubbo-go] zouyx commented on a change in pull request #535: Rft : Change subscribe service key in registrydatalistener

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



##########
File path: registry/zookeeper/registry.go
##########
@@ -129,12 +129,17 @@ func (r *zkRegistry) InitListeners() {
 		recoverd := r.dataListener.subscribed
 		if recoverd != nil && len(recoverd) > 0 {
 			// recover all subscribed url
-			for conf, oldListener := range recoverd {
+			for recoveredURL, oldListener := range recoverd {
 				if regConfigListener, ok := oldListener.(*RegistryConfigurationListener); ok {
 					regConfigListener.Close()
 				}
-				newDataListener.SubscribeURL(conf, NewRegistryConfigurationListener(r.client, r))
-				go r.listener.ListenServiceEvent(conf, fmt.Sprintf("/dubbo/%s/"+constant.DEFAULT_CATEGORY, url.QueryEscape(conf.Service())), newDataListener)
+				serviceURL, err := common.NewURL(recoveredURL)

Review comment:
       There will use key of subscribed map to recover , so i think it can not change to service key.
   
   @hxmhlt what do you think?




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