XnLemon commented on PR #3395: URL: https://github.com/apache/dubbo-go/pull/3395#issuecomment-4689292965
> Cache key 的 `app` 维度仍可能不是 provider app。[service_discovery_registry.go](/tmp/dubbo-go-pr3395-review/registry/servicediscovery/service_discovery_registry.go:367) 创建 listener 时传的是订阅 URL 的 `application`,通常是 consumer app;但 listener 同时处理 `services` 里的多个 provider app。后面 [service_instances_changed_listener_impl.go](/tmp/dubbo-go-pr3395-review/registry/servicediscovery/service_instances_changed_listener_impl.go:257) 用这个 `app` 拼 `app:registry:revision`,所以 PR 声称修复的跨 app revision cache collision 并没有真正按 provider app 隔离。建议用 `instance.GetServiceName()` / `ce.ServiceName` 作为 cache key app 维度,并考虑 `revisionToMetadata` 这类内存 map 也一起按 provider app + revision 分维度。 梳理明白了 我直接使用的 consumer app 把这个区分维度相当于废掉了 还有很多只用 revision 隔离的也没有考虑到 现在进行一下区分 类似于 `revisionToMetadata[revision]` 这种 key 加 provider app 维度 / cachekey 使用 `provider app` 而非 `lstn.app` 感谢您的指导 owo)b -- 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]
