From 1eae69d116c7625e0e759d3d6f10d00ba85bcc36 Mon Sep 17 00:00:00 2001 From: "sixie.xyn" Date: Mon, 20 May 2019 16:21:18 +0800 Subject: [PATCH 1/5] update erlang link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 440da311822..b7b9c8e9f52 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ Please report security vulnerability to [us](mailto:security@dubbo.incubator.apa * [Python](https://github.com/dubbo/dubbo-client-py) * [PHP](https://github.com/dubbo/dubbo-php-framework) * [Go](https://github.com/dubbo/dubbo-go) -* [Erlang](https://github.com/dubboerl/dubboerl) +* [Erlang](https://github.com/apache/incubator-dubbo-erlang) ## License From f384563d25a0c407f68bf05cf10176fdf59ec586 Mon Sep 17 00:00:00 2001 From: "sixie.xyn" Date: Wed, 22 May 2019 11:32:12 +0800 Subject: [PATCH 2/5] fix for #4111 do not ignore empty value when we construct servicename --- .../apache/dubbo/registry/nacos/NacosRegistry.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java index 1af3ec2059c..77813fd310f 100644 --- a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java +++ b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java @@ -420,16 +420,17 @@ private String getServiceName(URL url) { private String getServiceName(URL url, String category) { StringBuilder serviceNameBuilder = new StringBuilder(category); - appendIfPresent(serviceNameBuilder, url, INTERFACE_KEY); - appendIfPresent(serviceNameBuilder, url, VERSION_KEY); - appendIfPresent(serviceNameBuilder, url, GROUP_KEY); + append(serviceNameBuilder, url, INTERFACE_KEY); + append(serviceNameBuilder, url, VERSION_KEY); + append(serviceNameBuilder, url, GROUP_KEY); return serviceNameBuilder.toString(); } - private void appendIfPresent(StringBuilder target, URL url, String parameterName) { + private void append(StringBuilder target, URL url, String parameterName) { + target.append(SERVICE_NAME_SEPARATOR); String parameterValue = url.getParameter(parameterName); if (!StringUtils.isBlank(parameterValue)) { - target.append(SERVICE_NAME_SEPARATOR).append(parameterValue); + target.append(parameterValue); } } From 3bb8bb25708abad120215ce13730f5ddab3bd84e Mon Sep 17 00:00:00 2001 From: "sixie.xyn" Date: Wed, 22 May 2019 17:40:31 +0800 Subject: [PATCH 3/5] fix : version is optional --- .../java/org/apache/dubbo/registry/nacos/NacosRegistry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java index 77813fd310f..e8577c07720 100644 --- a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java +++ b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java @@ -286,11 +286,11 @@ private void filterServiceNames(List serviceNames, URL url) { // split service name to segments // (required) segments[0] = category // (required) segments[1] = serviceInterface - // (required) segments[2] = version + // (optional) segments[2] = version // (optional) segments[3] = group String[] segments = StringUtils.split(serviceName, SERVICE_NAME_SEPARATOR); int length = segments.length; - if (length < 3) { // must present 3 segments or more + if (length < 2) { // must present 3 segments or more return false; } From 3904168c100cbac268086089763e326fd708cad3 Mon Sep 17 00:00:00 2001 From: "sixie.xyn" Date: Wed, 22 May 2019 17:48:34 +0800 Subject: [PATCH 4/5] fix : ArrayOutOfBounds --- .../org/apache/dubbo/registry/nacos/NacosRegistry.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java index e8577c07720..7c369deb156 100644 --- a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java +++ b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java @@ -278,9 +278,9 @@ private void filterServiceNames(List serviceNames, URL url) { final String targetServiceInterface = url.getServiceInterface(); - final String targetVersion = url.getParameter(VERSION_KEY); + final String targetVersion = url.getParameter(VERSION_KEY,""); - final String targetGroup = url.getParameter(GROUP_KEY); + final String targetGroup = url.getParameter(GROUP_KEY,""); filterData(serviceNames, serviceName -> { // split service name to segments @@ -290,7 +290,7 @@ private void filterServiceNames(List serviceNames, URL url) { // (optional) segments[3] = group String[] segments = StringUtils.split(serviceName, SERVICE_NAME_SEPARATOR); int length = segments.length; - if (length < 2) { // must present 3 segments or more + if (length != 4) { // must present 4 segments return false; } @@ -311,8 +311,7 @@ private void filterServiceNames(List serviceNames, URL url) { return false; } - String group = length > 3 ? segments[SERVICE_GROUP_INDEX] : null; - // no match service group + String group = segments[SERVICE_GROUP_INDEX]; return group == null || WILDCARD.equals(targetGroup) || StringUtils.equals(targetGroup, group); }); From 6ac851fad12d144942fc2917f810867065c7fc5e Mon Sep 17 00:00:00 2001 From: "sixie.xyn" Date: Tue, 28 May 2019 10:01:24 +0800 Subject: [PATCH 5/5] fix for #4175 , ServiceConfigurationListener should override ProviderConfigurationListener --- .../org/apache/dubbo/registry/integration/RegistryProtocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java index 0c94708f6fb..f55e1a2c2cc 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java @@ -557,9 +557,9 @@ public synchronized void doOverrideIfNecessary() { URL currentUrl = exporter.getInvoker().getUrl(); //Merged with this configuration URL newUrl = getConfigedInvokerUrl(configurators, originUrl); + newUrl = getConfigedInvokerUrl(providerConfigurationListener.getConfigurators(), newUrl); newUrl = getConfigedInvokerUrl(serviceConfigurationListeners.get(originUrl.getServiceKey()) .getConfigurators(), newUrl); - newUrl = getConfigedInvokerUrl(providerConfigurationListener.getConfigurators(), newUrl); if (!currentUrl.equals(newUrl)) { RegistryProtocol.this.reExport(originInvoker, newUrl); logger.info("exported provider url changed, origin url: " + originUrl +