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/01/25 02:45:19 UTC
[dubbo] branch 3.0 updated (5672670 -> 60bc043)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a change to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git.
from 5672670 eager thradpool refine (#9608)
new 247a0ee check interfaceClass and classLoader before load
new d4216ad try refreshing registry config
new 60bc043 fix wrong context reference
The 3 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:
.../src/main/java/org/apache/dubbo/config/ReferenceConfig.java | 6 +++---
.../java/org/apache/dubbo/config/utils/ConfigValidationUtils.java | 4 ++++
.../main/java/org/apache/dubbo/rpc/proxy/AbstractProxyInvoker.java | 2 +-
3 files changed, 8 insertions(+), 4 deletions(-)
[dubbo] 01/03: check interfaceClass and classLoader before load
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit 247a0ee9f4c771d3d1dcd397fdccca07fffe3755
Author: ken.lj <ke...@gmail.com>
AuthorDate: Wed Jan 19 10:31:06 2022 +0800
check interfaceClass and classLoader before load
---
.../src/main/java/org/apache/dubbo/config/ReferenceConfig.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
index 0632cd3..02cf62c 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
@@ -566,11 +566,11 @@ public class ReferenceConfig<T> extends ReferenceConfigBase<T> {
interfaceClass = GenericService.class;
} else {
try {
- if (getInterfaceClassLoader() != null) {
+ if (getInterfaceClassLoader() != null && (interfaceClass == null || interfaceClass.getClassLoader() != getInterfaceClassLoader())) {
interfaceClass = Class.forName(interfaceName, true, getInterfaceClassLoader());
- } else {
+ } else if (interfaceClass == null) {
interfaceClass = Class.forName(interfaceName, true, Thread.currentThread()
- .getContextClassLoader());
+ .getContextClassLoader());
}
} catch (ClassNotFoundException e) {
throw new IllegalStateException(e.getMessage(), e);
[dubbo] 03/03: fix wrong context reference
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit 60bc043c5726373ff13e20472440227f26719465
Author: ken.lj <ke...@gmail.com>
AuthorDate: Fri Jan 21 15:42:04 2022 +0800
fix wrong context reference
---
.../src/main/java/org/apache/dubbo/rpc/proxy/AbstractProxyInvoker.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/AbstractProxyInvoker.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/AbstractProxyInvoker.java
index 11cafc7..1743e69 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/AbstractProxyInvoker.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/AbstractProxyInvoker.java
@@ -136,7 +136,7 @@ public abstract class AbstractProxyInvoker<T> implements Invoker<T> {
if (value instanceof CompletableFuture) {
invocation.put(PROVIDER_ASYNC_KEY, Boolean.TRUE);
return (CompletableFuture<Object>) value;
- } else if (RpcContext.getServiceContext().isAsyncStarted()) {
+ } else if (RpcContext.getServerAttachment().isAsyncStarted()) {
invocation.put(PROVIDER_ASYNC_KEY, Boolean.TRUE);
return ((AsyncContextImpl) (RpcContext.getServiceContext().getAsyncContext())).getInternalFuture();
}
[dubbo] 02/03: try refreshing registry config
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit d4216ad85470cdc272d90fc8b40ddfcf64bbf87e
Author: ken.lj <ke...@gmail.com>
AuthorDate: Fri Jan 21 15:41:30 2022 +0800
try refreshing registry config
---
.../java/org/apache/dubbo/config/utils/ConfigValidationUtils.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
index f85f820..e4cab88 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
@@ -194,6 +194,10 @@ public class ConfigValidationUtils {
List<RegistryConfig> registries = interfaceConfig.getRegistries();
if (CollectionUtils.isNotEmpty(registries)) {
for (RegistryConfig config : registries) {
+ // try to refresh registry in case it is set directly by user using config.setRegistries()
+ if (!config.isRefreshed()) {
+ config.refresh();
+ }
String address = config.getAddress();
if (StringUtils.isEmpty(address)) {
address = ANYHOST_VALUE;