You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/12/29 09:34:23 UTC
[dubbo] branch 3.2 updated (2a7dd3dc29 -> f5df7edcdf)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a change to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
from 2a7dd3dc29 Fix error code in 3.2 branch (#11199)
add f5a5fa29a4 npe fix (#11192)
add 0e549fb064 Turn on error reporting of Error Code Inspector. (#11182)
add 513bdf56b0 1.test JSONObject to personMap pojo, the personMap extends HashMap (#11177)
add 0d02c79542 Fix Spring Cloud metadata override (#11197)
add 98c2f39090 Fix deadlocks in lazy-init situations. (#11194)
add a7592e3bea Fix warn when port are the same (#11202)
add 58131051c3 Fix active limit filter not work (#11206)
add 992e125a1a Merge error code 1-36 to 99-0. (#11207)
add 1ecc00a713 Fix Nacos empty ticket not work (#11213)
add e86e6e3209 Fix zookeeper instance update (#11212)
new 0e4997b252 Merge branch 'apache-3.1' into apache-3.2
new f5df7edcdf resolve conflict
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/build-and-test-pr.yml | 6 +++--
.github/workflows/build-and-test-scheduled-3.1.yml | 6 +++--
.github/workflows/build-and-test-scheduled-3.2.yml | 6 +++--
.github/workflows/release-test-3.1.yml | 6 +++--
.../wrapper/CompositeDynamicConfiguration.java | 4 +--
.../common/constants/LoggerCodeConstants.java | 21 +++++++++++----
.../dubbo/common/model/person/PersonMap.java | 31 ++++++++++++----------
.../apache/dubbo/common/utils/PojoUtilsTest.java | 12 ++++++++-
.../apache/dubbo/config/spring/ReferenceBean.java | 8 +++++-
.../metadata/store/nacos/NacosMetadataReport.java | 2 +-
.../dubbo/registry/ListenerRegistryWrapper.java | 4 +--
.../registry/client/ServiceDiscoveryRegistry.java | 16 +++++------
.../listener/ServiceInstancesChangedListener.java | 14 +++++-----
.../client/metadata/MetadataServiceDelegation.java | 6 +++++
.../metadata/MetadataServiceNameMapping.java | 4 +--
.../metadata/ProtocolPortsMetadataCustomizer.java | 4 +--
...CloudServiceInstanceNotificationCustomizer.java | 3 ++-
.../client/migration/MigrationRuleHandler.java | 4 +--
.../client/migration/MigrationRuleListener.java | 8 +++---
.../registry/integration/RegistryProtocol.java | 10 +++----
.../dubbo/registry/support/AbstractRegistry.java | 4 +--
.../dubbo/registry/support/FailbackRegistry.java | 6 ++---
.../dubbo/registry/support/RegistryManager.java | 4 +--
.../zookeeper/ZookeeperServiceDiscovery.java | 15 +++++++++++
.../dubbo/internal/org.apache.dubbo.rpc.Filter | 1 +
25 files changed, 133 insertions(+), 72 deletions(-)
copy dubbo-compatible/src/test/java/org/apache/dubbo/cache/MyCache.java => dubbo-common/src/test/java/org/apache/dubbo/common/model/person/PersonMap.java (61%)
[dubbo] 01/02: Merge branch 'apache-3.1' into apache-3.2
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit 0e4997b252027ec04037aa58609ece7c7d1236f3
Merge: 2a7dd3dc29 e86e6e3209
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Dec 29 17:33:02 2022 +0800
Merge branch 'apache-3.1' into apache-3.2
# Conflicts:
# dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java
# dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
# dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java
# dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter
.github/workflows/build-and-test-pr.yml | 6 ++-
.github/workflows/build-and-test-scheduled-3.1.yml | 6 ++-
.github/workflows/build-and-test-scheduled-3.2.yml | 6 ++-
.github/workflows/release-test-3.1.yml | 6 ++-
.../wrapper/CompositeDynamicConfiguration.java | 4 +-
.../common/constants/LoggerCodeConstants.java | 21 +++++++---
.../dubbo/common/model/person/PersonMap.java | 45 ++++++++++++++++++++++
.../apache/dubbo/common/utils/PojoUtilsTest.java | 12 +++++-
.../apache/dubbo/config/spring/ReferenceBean.java | 8 +++-
.../metadata/store/nacos/NacosMetadataReport.java | 2 +-
.../dubbo/registry/ListenerRegistryWrapper.java | 4 +-
.../registry/client/ServiceDiscoveryRegistry.java | 15 ++++----
.../listener/ServiceInstancesChangedListener.java | 14 +++----
.../client/metadata/MetadataServiceDelegation.java | 6 +++
.../metadata/MetadataServiceNameMapping.java | 4 +-
.../metadata/ProtocolPortsMetadataCustomizer.java | 4 +-
...CloudServiceInstanceNotificationCustomizer.java | 3 +-
.../client/migration/MigrationRuleHandler.java | 4 +-
.../client/migration/MigrationRuleListener.java | 8 ++--
.../registry/integration/RegistryProtocol.java | 10 ++---
.../dubbo/registry/support/AbstractRegistry.java | 4 +-
.../dubbo/registry/support/FailbackRegistry.java | 6 +--
.../dubbo/registry/support/RegistryManager.java | 4 +-
.../zookeeper/ZookeeperServiceDiscovery.java | 15 ++++++++
.../dubbo/internal/org.apache.dubbo.rpc.Filter | 1 +
25 files changed, 161 insertions(+), 57 deletions(-)
diff --cc dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java
index 84725c07dc,bd33f16ea4..35b9e27993
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java
@@@ -75,11 -75,13 +75,15 @@@ public interface LoggerCodeConstants
String COMMON_METADATA_PROCESSOR = "0-26";
+ String COMMON_ISOLATED_EXECUTOR_CONFIGURATION_ERROR = "0-27";
+
- // registry module
+ // Registry module
-
++
String REGISTRY_ADDRESS_INVALID = "1-1";
+ /**
+ * Absent. Merged with 0-2.
+ */
String REGISTRY_ABSENCE = "1-2";
String REGISTRY_FAILED_URL_EVICTING = "1-3";
@@@ -201,7 -202,7 +208,7 @@@
String CLUSTER_FAILED_GROUP_MERGE = "2-20";
- // proxy module 3-1
- // Proxy module.
++ // Proxy module. 3-1
String PROXY_FAILED_CONVERT_URL = "3-1";
String PROXY_FAILED_EXPORT_SERVICE = "3-2";
@@@ -216,9 -217,7 +223,9 @@@
String PROXY_TIMEOUT_RESPONSE = "3-7";
+ String PROXY_FAILED = "3-8";
+
- // protocol module
+ // Protocol module.
String PROTOCOL_UNSUPPORTED = "4-1";
String PROTOCOL_FAILED_INIT_SERIALIZATION_OPTIMIZER = "4-2";
@@@ -386,9 -385,11 +393,13 @@@
String QOS_UNEXPECTED_EXCEPTION = "7-6";
+ String QOS_PERMISSION_DENY_EXCEPTION = "7-7";
+
// Internal unknown error.
+
+ /**
+ * Unknown internal error. (99-0)
+ */
String INTERNAL_ERROR = "99-0";
String INTERNAL_INTERRUPTED = "99-1";
diff --cc dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
index 387452690b,6094cd969d..fa312813f7
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
@@@ -42,7 -42,6 +42,7 @@@ import static org.apache.dubbo.common.c
import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER_SIDE;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
- import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_UNEXPECTED_EXCEPTION;
++import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
import static org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_CLUSTER_KEY;
import static org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_TYPE_KEY;
import static org.apache.dubbo.common.constants.RegistryConstants.SERVICE_REGISTRY_TYPE;
@@@ -194,35 -193,31 +194,36 @@@ public class ServiceDiscoveryRegistry e
boolean check = url.getParameter(CHECK_KEY, false);
+ Set<String> mappingByUrl = ServiceNameMapping.getMappingByUrl(url);
+
String key = ServiceNameMapping.buildMappingKey(url);
- Lock mappingLock = serviceNameMapping.getMappingLock(key);
- try {
- mappingLock.lock();
- Set<String> subscribedServices = serviceNameMapping.getCachedMapping(url);
+
- if(mappingByUrl == null) {
++
++ if (mappingByUrl == null) {
+ Lock mappingLock = serviceNameMapping.getMappingLock(key);
try {
- MappingListener mappingListener = new DefaultMappingListener(url, subscribedServices, listener);
- subscribedServices = serviceNameMapping.getAndListen(this.getUrl(), url, mappingListener);
- mappingListeners.put(url.getProtocolServiceKey(), mappingListener);
- } catch (Exception e) {
- logger.warn(INTERNAL_ERROR, "unknown error in registry module", "", "Cannot find app mapping for service " + url.getServiceInterface() + ", will not migrate.", e);
- }
+ mappingLock.lock();
- Set<String> subscribedServices = serviceNameMapping.getMapping(url);
++ mappingByUrl = serviceNameMapping.getCachedMapping(url);
+ try {
+ MappingListener mappingListener = new DefaultMappingListener(url, subscribedServices, listener);
+ mappingByUrl = serviceNameMapping.getAndListen(this.getUrl(), url, mappingListener);
+ mappingListeners.put(url.getProtocolServiceKey(), mappingListener);
+ } catch (Exception e) {
+ logger.warn(INTERNAL_ERROR, "", "", "Cannot find app mapping for service " + url.getServiceInterface() + ", will not migrate.", e);
+ }
- if (CollectionUtils.isEmpty(subscribedServices)) {
- logger.info("No interface-apps mapping found in local cache, stop subscribing, will automatically wait for mapping listener callback: " + url);
+ if (CollectionUtils.isEmpty(mappingByUrl)) {
+ logger.info("No interface-apps mapping found in local cache, stop subscribing, will automatically wait for mapping listener callback: " + url);
- // if (check) {
- // throw new IllegalStateException("Should has at least one way to know which services this interface belongs to, subscription url: " + url);
- // }
+ // if (check) {
+ // throw new IllegalStateException("Should has at least one way to know which services this interface belongs to, subscription url: " + url);
+ // }
- return;
+ return;
+ }
+ } finally {
+ mappingLock.unlock();
}
-
- subscribeURLs(url, listener, subscribedServices);
- } finally {
- mappingLock.unlock();
}
+ subscribeURLs(url, listener, mappingByUrl);
}
@Override
diff --cc dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java
index b4f9d73629,6196331538..f5f3ebac6d
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java
@@@ -56,8 -56,7 +56,8 @@@ import java.util.concurrent.atomic.Atom
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_KEY;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_FAILED_REFRESH_ADDRESS;
- import static org.apache.dubbo.common.constants.LoggerCodeConstants.REGISTRY_UNEXPECTED_EXCEPTION;
+ import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
+import static org.apache.dubbo.common.constants.RegistryConstants.DEFAULT_ENABLE_EMPTY_PROTECTION;
import static org.apache.dubbo.common.constants.RegistryConstants.EMPTY_PROTOCOL;
import static org.apache.dubbo.common.constants.RegistryConstants.ENABLE_EMPTY_PROTECTION_KEY;
import static org.apache.dubbo.metadata.RevisionResolver.EMPTY_REVISION;
diff --cc dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter
index 792fbe4f30,6f877fb7e9..dcc7bd45ec
--- a/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.rpc.Filter
@@@ -13,4 -13,4 +13,5 @@@ compatible=org.apache.dubbo.rpc.filter.
timeout=org.apache.dubbo.rpc.filter.TimeoutFilter
tps=org.apache.dubbo.rpc.filter.TpsLimitFilter
profiler-server=org.apache.dubbo.rpc.filter.ProfilerServerFilter
+adaptiveLoadBalance=org.apache.dubbo.rpc.filter.AdaptiveLoadBalanceFilter
+ active-limit=org.apache.dubbo.rpc.filter.ActiveLimitFilter
[dubbo] 02/02: resolve conflict
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit f5df7edcdfbe3eed21e34700d7dc42e1bf925fa2
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Dec 29 17:33:56 2022 +0800
resolve conflict
---
.../org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
index fa312813f7..0347cf369c 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
@@ -42,7 +42,6 @@ import static org.apache.dubbo.common.constants.CommonConstants.CHECK_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER_SIDE;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
import static org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_CLUSTER_KEY;
import static org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_TYPE_KEY;
import static org.apache.dubbo.common.constants.RegistryConstants.SERVICE_REGISTRY_TYPE;
@@ -203,9 +202,9 @@ public class ServiceDiscoveryRegistry extends FailbackRegistry {
Lock mappingLock = serviceNameMapping.getMappingLock(key);
try {
mappingLock.lock();
- mappingByUrl = serviceNameMapping.getCachedMapping(url);
+ mappingByUrl = serviceNameMapping.getMapping(url);
try {
- MappingListener mappingListener = new DefaultMappingListener(url, subscribedServices, listener);
+ MappingListener mappingListener = new DefaultMappingListener(url, mappingByUrl, listener);
mappingByUrl = serviceNameMapping.getAndListen(this.getUrl(), url, mappingListener);
mappingListeners.put(url.getProtocolServiceKey(), mappingListener);
} catch (Exception e) {