Alanxtl opened a new issue, #3355: URL: https://github.com/apache/dubbo-go/issues/3355
### 背景 当前路线只保留应用级 metadata,metadata center 主要保存 app metadata 和 service-app mapping。这个 issue 不讨论恢复 provider / consumer 服务级 metadata,只讨论应用级 metadata 在 metadata center 中的更新和清理策略。 相关代码: - `metadata/report/nacos/report.go` - `metadata/report/zookeeper/report.go` - `metadata/report/etcd/report.go` - `registry/servicediscovery/service_discovery_registry.go` ### 当前问题 目前应用级 metadata 发布后缺少清理/更新语义: - app metadata 按 revision 写入后没有 unpublish / cleanup 策略 - 旧 revision 数据可能长期堆积 - Zookeeper 实现遇到节点已存在时直接忽略,不更新内容 - provider unregister 后不会更新或清理 service-app mapping 中的 app 关系 - revision 计算不够精确时,旧内容更容易残留 ### 建议 - 明确 app metadata revision 的生命周期:发布、更新、过期、清理 - 为 metadata center 中的旧 revision 提供清理策略或 TTL 方案 - Zookeeper 已存在节点时应校验是否需要更新 - 明确 provider unregister 时是否需要更新 mapping,至少要有设计说明和测试覆盖 - 增加 metadata center 数据更新/清理相关测试 -- 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]
