Alanxtl opened a new issue, #3351: URL: https://github.com/apache/dubbo-go/issues/3351
### 背景 `#2534` 后,应用级 metadata 的核心消费链路是:consumer 发现应用实例后,根据 revision 获取远端 `MetadataInfo`,再还原服务 URL。这个 issue 只讨论应用级 `MetadataInfo` 的远端获取可靠性,不涉及服务级 metadata 或 `ServiceDefinition`。 相关代码: - `registry/servicediscovery/service_instances_changed_listener_impl.go` - `metadata/client.go` ### 当前问题 当前获取策略比较单一: - metadata storage type 为 remote 时只走 metadata report - 非 remote 时只走 RPC MetadataService - metadata report 失败后没有 fallback 到 RPC - RPC MetadataService URL 参数缺失时,`buildStandardMetadataServiceURL` 可能返回 nil,但后续逻辑没有完整防护 - cache key 主要基于 revision,跨 app / registry 场景可能不够精确 ### 建议 - 为 metadata report -> RPC MetadataService 增加可控 fallback - 为 RPC URL 缺失、协议缺失、端口缺失增加明确错误处理 - metadata cache key 考虑 app、registry、revision 等维度 - 增加 remote/report/RPC/fallback 的行为测试 - 让日志能够区分 report 获取失败、RPC 获取失败、metadata URL 构造失败等场景 -- 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]
