DMwangnima commented on code in PR #2531:
URL: https://github.com/apache/dubbo-go/pull/2531#discussion_r1413913131


##########
config/service.go:
##########
@@ -34,6 +34,7 @@ var (
        conServices                  = map[string]common.RPCService{} // 
service name -> service
        proServicesLock              = sync.Mutex{}                   // used 
to guard proServices map

Review Comment:
   Modify comment:
   ```used to guard proServices map``` to ```used to guard proServices and 
proServicesInfo maps```.



##########
config/service.go:
##########
@@ -60,6 +61,18 @@ func SetProviderService(service common.RPCService) {
        proServices[ref] = service
 }
 
+// SetProviderServiceWithInfo is called by init() of implement of RPCService

Review Comment:
   implement => implementation.



##########
config/service_config.go:
##########
@@ -329,7 +339,11 @@ func (s *ServiceConfig) Export() error {
                                        logger.Warnf("SetMetadataServiceURL 
error = %s", err)
                                }
                        }
-                       invoker := proxyFactory.GetInvoker(ivkURL)
+                       if info == nil {

Review Comment:
   ditto.



##########
config/service_config.go:
##########
@@ -311,7 +317,11 @@ func (s *ServiceConfig) Export() error {
 
                        for _, regUrl := range regUrls {
                                setRegistrySubURL(ivkURL, regUrl)
-                               invoker := proxyFactory.GetInvoker(regUrl)
+                               if info == nil {

Review Comment:
   We could extract a function such as ```generateInvoker```.



-- 
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-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to