Modo-me commented on code in PR #3605:
URL: https://github.com/apache/dubbo-go/pull/3605#discussion_r3764711364


##########
metadata/mapping/metadata/service_name_mapping.go:
##########
@@ -71,20 +74,34 @@ type ServiceNameMapping struct {
 }
 
 // Map will map the service to this application-level service
-func (d *ServiceNameMapping) Map(url *common.URL) error {
+func (d *ServiceNameMapping) Map(url *common.URL) (err error) {
        serviceInterface := url.GetParam(constant.InterfaceKey, "")
        appName := url.GetParam(constant.ApplicationKey, "")
        // url is the service url,not the registry url,this url has no registry 
id info,can not get where to write mapping,so write all
        // if the mapping can hold a report instance, it can write once
        metadataReports := metadata.GetMetadataReports()
        if len(metadataReports) == 0 {
-               return perrors.New("can not registering mapping to remote cause 
no metadata report instance found")
+               err = perrors.New("can not registering mapping to remote cause 
no metadata report instance found")

Review Comment:
   已修复:调整了event和错误返回的顺序;添加了无report情况的回归测试



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