Alanxtl opened a new issue, #3350:
URL: https://github.com/apache/dubbo-go/issues/3350

   ### 背景
   
   `#2534` 之后,`dubbo-go` 的 metadata 路线收敛到应用级 metadata:通过 
`MetadataInfo`、revision、service-app mapping 和 `MetadataService` 支撑应用级服务发现。这个 
issue 只讨论应用级 metadata revision,不涉及 `ServiceDefinition` 或 provider / consumer 
服务级 metadata。
   
   应用级 metadata 依赖 revision 判断远端 `MetadataInfo` 是否变化。目前 revision 由 
`registry/servicediscovery/customizer/service_revision_customizer.go` 中的 
`resolveRevision` 计算。
   
   ### 当前问题
   
   当前 revision 计算主要基于 application、path、version、port、method,并通过 CRC32 
累加得到结果。这个规则偏粗,可能无法覆盖所有影响服务语义的 metadata。
   
   潜在问题包括:
   - group、protocol、部分 URL params 等重要字段变化时 revision 可能不变
   - 不同 URL 组合存在弱碰撞风险
   - revision 与实际序列化后的 `MetadataInfo` 内容不是强绑定
   - consumer 端可能因为 revision 未变化而继续使用旧 metadata cache
   
   ### 建议
   
   - 明确定义应用级 metadata revision 的输入字段
   - 尽量基于规范化后的 `MetadataInfo` 内容计算 revision
   - 保证排序、序列化、hash 规则稳定
   - 补充 group/protocol/params/method 变化导致 revision 变化的测试
   - 保留与现有 revision 的兼容迁移策略
   


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