lizining1231 commented on code in PR #3590:
URL: https://github.com/apache/dubbo-go/pull/3590#discussion_r3708056240


##########
registry/servicediscovery/service_discovery_registry.go:
##########
@@ -129,6 +125,12 @@ func (s *serviceDiscoveryRegistry) RegisterService() error 
{
                s.lock.Unlock()
        }
 
+       if metadata.GetMetadataType() == constant.RemoteMetadataStorageType {

Review Comment:
   感谢review! 我已做出改动避免空URL时进入远程发布, 具体改动如下:
   1. 在函数开头空 exported URL 即 no-op, 纯消费者/无 provider 直接返回,不进入发布路径
   2. 在发布前检查 `s.metadataReport == nil`
   `registry/servicediscovery/service_discovery_registry_test.go:`
   3. L247-L287: 补充测试纯消费者+remote metadata, URLs为空时发布和注册都不发生
   4. L291-L329: 补充测试 nil report, 返回错误, 不注册实例
   5. L333-L367: 补充测试零发布次数, local模式下实例正常注册但发布次数为零
   6. L994-L1039: 补充测试revision timer(并同步更新相关代码以确保不启动空revision timer)



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