Skip to content

Commit

Permalink
fix issue#9922, merge the provider side parameters exclude tag (#9933)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoguhong committed May 9, 2022
1 parent c5c1bad commit beb96b4
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -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;
Expand Down Expand Up @@ -354,8 +356,11 @@ private URL mergeUrl(URL providerUrl) {

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
Expand Down

0 comments on commit beb96b4

Please sign in to comment.