XnLemon commented on code in PR #3369:
URL: https://github.com/apache/dubbo-go/pull/3369#discussion_r3384971152


##########
metadata/mapping/metadata/service_name_mapping.go:
##########
@@ -89,18 +90,51 @@ func (d *ServiceNameMapping) Map(url *common.URL) error {
 // Get will return the application-level services. If not found, the empty set 
will be returned.
 func (d *ServiceNameMapping) Get(url *common.URL, listener 
mapping.MappingListener) (*gxset.HashSet, error) {
        serviceInterface := url.GetParam(constant.InterfaceKey, "")
-       metadataReport := metadata.GetMetadataReport()
-       if metadataReport == nil {
+       metadataReports := metadata.GetMetadataReports()
+       if len(metadataReports) == 0 {
                return nil, perrors.New("can not get mapping in remote cause no 
metadata report instance found")
        }
-       return metadataReport.GetServiceAppMapping(serviceInterface, 
DefaultGroup, listener)
+       var result *gxset.HashSet
+       var errs []error
+       for i, metadataReport := range metadataReports {
+               var reportListener mapping.MappingListener
+               if i == 0 {
+                       reportListener = listener
+               }

Review Comment:
   可以接受 确实listener可以通过返回确定report的GetMetadataReport() 从而做到确定性的绑定 applied



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