XnLemon commented on code in PR #3369:
URL: https://github.com/apache/dubbo-go/pull/3369#discussion_r3384897677
##########
registry/servicediscovery/service_instances_changed_listener_impl.go:
##########
@@ -242,11 +244,12 @@ func (lstn *ServiceInstancesChangedListenerImpl)
GetEventType() reflect.Type {
}
// GetMetadataInfo get metadata info when MetadataStorageTypePropertyName is
null
-func GetMetadataInfo(app string, instance registry.ServiceInstance, revision
string) (*info.MetadataInfo, error) {
+func GetMetadataInfo(app string, instance registry.ServiceInstance, revision
string, registryId string) (*info.MetadataInfo, error) {
cacheOnce.Do(func() {
initCache(app)
})
- if metadataInfo, ok := metaCache.Get(revision); ok {
+ cacheKey := registryId + ":" + revision
+ if metadataInfo, ok := metaCache.Get(cacheKey); ok {
return metadataInfo.(*info.MetadataInfo), nil
}
Review Comment:
Unify all cachekeys to app:registryId: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]