You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2022/05/09 02:21:31 UTC

[dubbo] branch master updated: fix issue#9922, merge the provider side parameters exclude tag (#9933)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new beb96b4bec  fix issue#9922, merge the provider side parameters exclude tag (#9933)
beb96b4bec is described below

commit beb96b4bec613d973b833b959bc3d53cbb3e28cc
Author: zhaoguhong <zh...@163.com>
AuthorDate: Mon May 9 10:21:24 2022 +0800

     fix issue#9922, merge the provider side parameters exclude tag (#9933)
---
 .../org/apache/dubbo/registry/integration/RegistryDirectory.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
index 5227974771..8815a100df 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
@@ -16,8 +16,10 @@
  */
 package org.apache.dubbo.registry.integration;
 
+import java.util.HashMap;
 import org.apache.dubbo.common.URL;
 import org.apache.dubbo.common.config.configcenter.DynamicConfiguration;
+import org.apache.dubbo.common.constants.CommonConstants;
 import org.apache.dubbo.common.extension.ExtensionLoader;
 import org.apache.dubbo.common.logger.Logger;
 import org.apache.dubbo.common.logger.LoggerFactory;
@@ -354,8 +356,11 @@ public class RegistryDirectory<T> extends DynamicDirectory<T> {
 
         providerUrl = providerUrl.addParameter(Constants.CHECK_KEY, String.valueOf(false)); // Do not check whether the connection is successful or not, always create Invoker!
 
+        // fix issue#9922
+        Map<String, String> providerSideParameters = new HashMap<>(providerUrl.getParameters());
+        providerSideParameters.remove(CommonConstants.TAG_KEY);
         // The combination of directoryUrl and override is at the end of notify, which can't be handled here
-        this.overrideDirectoryUrl = this.overrideDirectoryUrl.addParametersIfAbsent(providerUrl.getParameters()); // Merge the provider side parameters
+        this.overrideDirectoryUrl = this.overrideDirectoryUrl.addParametersIfAbsent(providerSideParameters); // Merge the provider side parameters
 
         if ((providerUrl.getPath() == null || providerUrl.getPath()
                 .length() == 0) && DUBBO_PROTOCOL.equals(providerUrl.getProtocol())) { // Compatible version 1.0