lizining1231 commented on code in PR #3590:
URL: https://github.com/apache/dubbo-go/pull/3590#discussion_r3708050259
##########
registry/servicediscovery/service_discovery_registry.go:
##########
@@ -129,6 +125,12 @@ func (s *serviceDiscoveryRegistry) RegisterService() error
{
s.lock.Unlock()
}
+ if metadata.GetMetadataType() == constant.RemoteMetadataStorageType {
+ if err := s.metadataReport.PublishAppMetadata(metaInfo.App,
metaInfo.Revision, metaInfo); err != nil {
Review Comment:
感谢review! 我已做出先发布元数据再暴露实例的改动,具体改动如下:
1. for构造全部实例并计算revision, 恢复发布与注册的顺序,先单次发布成功后for循环注册
`registry/servicediscovery/service_discovery_registry_test.go:`
2. L102: 恢复原先测试先发布后注册的断言
3. L155-L193: 补充测试残留实例, 发布失败在注册循环之前就 return,不留下可路由实例
4. L197-L243: 补充重试去重测试, 重试后恰好注册 1 次
5. `server/server_test.go`: 补充测试ServeContext 级发布失败
--
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]