This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new e6fb40a2c Dubbo cache bugs (#4439)
e6fb40a2c is described below

commit e6fb40a2c01dd052680eeb1deca668e9ffffb58c
Author: iwangjie <[email protected]>
AuthorDate: Mon Mar 6 14:14:22 2023 +0800

    Dubbo cache bugs (#4439)
    
    * [ISSUE #4432] fix dubbo invoker cache bugs.
    
    * [ISSUE #4432] set the cache key based on namespace.
    
    * [ISSUE #4432] revert test.
    
    * [ISSUE #4432] Use trinomial expressions instead of if
    
    * cache fix
    
    ---------
    
    Co-authored-by: mahaitao617 <[email protected]>
---
 .../apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java | 2 +-
 .../shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
 
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
index a327c9bb9..0a3114829 100644
--- 
a/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
+++ 
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java
@@ -148,7 +148,7 @@ public final class ApacheDubboConfigCache extends 
DubboConfigCache {
             return initRef(metaData);
         }
         try {
-            ReferenceConfig<GenericService> referenceConfig = 
cache.get(metaData.getPath());
+            ReferenceConfig<GenericService> referenceConfig = 
cache.get(namespace + ":" + metaData.getPath());
             if (StringUtils.isNoneBlank(referenceConfig.getInterface())) {
                 return referenceConfig;
             }
diff --git 
a/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
 
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
index 669505758..7cf3b026d 100644
--- 
a/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
+++ 
b/shenyu-plugin/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/proxy/ApacheDubboProxyService.java
@@ -71,7 +71,7 @@ public class ApacheDubboProxyService {
         }
         ReferenceConfig<GenericService> reference = 
ApacheDubboConfigCache.getInstance().get(referenceKey);
         if (StringUtils.isEmpty(reference.getInterface())) {
-            
ApacheDubboConfigCache.getInstance().invalidate(metaData.getPath());
+            ApacheDubboConfigCache.getInstance().invalidate(referenceKey);
             reference = 
ApacheDubboConfigCache.getInstance().initRefN(metaData, namespace);
         }
         GenericService genericService = reference.get();

Reply via email to