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

   ### 背景
   
   历史上 `dubbo-go` 的 metadata 模块在 `#2534` 中被大幅瘦身,方向是只保留应用级 metadata 主链路,删除 
provider / consumer 服务级 metadata 上报、`ServiceDefinition` 等重能力。这个 issue 不讨论 Java 
parity 或服务级 metadata,只聚焦当前应用级 metadata 的完整性。
   
   当前应用级 metadata 会在注册/订阅时写入本地 `MetadataInfo`,但删除链路没有完整闭合。
   
   相关代码:
   - `metadata/metadata.go`: `AddService`、`AddSubscribeURL`
   - `metadata/info/metadata_info.go`: `RemoveService`、`RemoveSubscribeURL`
   - `registry/servicediscovery/service_discovery_registry.go`: 
`UnRegister`、`UnSubscribe`
   
   ### 当前问题
   
   顶层 metadata 包只暴露了新增能力,registry 注销/取消订阅链路没有把 `RemoveService` / 
`RemoveSubscribeURL` 接上。
   
   这会导致:
   - 本地 `MetadataInfo` 残留已下线 service URL
   - revision 可能继续基于旧 URL 计算
   - `MetadataService.GetMetadataInfo` 可能返回过期服务信息
   - 动态注册/注销、订阅/取消订阅场景下 metadata 不可信
   
   ### 建议
   
   - 在 `metadata` 包补充顶层 remove API,例如 `RemoveService(registryId, url)` 和 
`RemoveSubscribeURL(registryId, url)`
   - 在 `UnRegister` / `UnSubscribe` 链路调用对应 remove API
   - 删除后重新计算并发布应用级 metadata 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