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

mahaitao 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 f6d42e8ed [ISSUE #4432] fix dubbo invoker cache bugs. (#4433)
f6d42e8ed is described below

commit f6d42e8ed597663df8062247e4f308b7d9152a11
Author: iwangjie <[email protected]>
AuthorDate: Mon Mar 6 10:23:19 2023 +0800

    [ISSUE #4432] fix dubbo invoker cache bugs. (#4433)
    
    * [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
    
    ---------
    
    Co-authored-by: mahaitao617 <[email protected]>
---
 .../apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 97aacc717..a327c9bb9 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
@@ -175,7 +175,7 @@ public final class ApacheDubboConfigCache extends 
DubboConfigCache {
             Object obj = reference.get();
             if (Objects.nonNull(obj)) {
                 LOG.info("buildN init apache dubbo reference success there 
meteData is :{}", metaData);
-                cache.put(namespace + ":" + metaData.getPath(), reference);
+                cache.put(StringUtils.isNotBlank(namespace) ? namespace + ":" 
+ metaData.getPath() : metaData.getPath(), reference);
             }
         } catch (Exception e) {
             LOG.error("buildN init apache dubbo reference exception", e);

Reply via email to