Skip to content

Commit

Permalink
Merge branch '3.2' into 0620-threadpool
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ authored Jun 23, 2024
2 parents 31eb8fd + 99601a6 commit 679e989
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-scheduled-3.3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
java-version: 21
- uses: actions/cache@v3
name: "Cache local Maven repository"
with:
Expand Down
2 changes: 1 addition & 1 deletion dubbo-demo/dubbo-demo-spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<skip_maven_deploy>true</skip_maven_deploy>
<spring-boot.version>2.7.18</spring-boot.version>
<spring-boot-maven-plugin.version>2.7.18</spring-boot-maven-plugin.version>
<micrometer-core.version>1.13.0</micrometer-core.version>
<micrometer-core.version>1.13.1</micrometer-core.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
12 changes: 6 additions & 6 deletions dubbo-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@
<properties>
<!-- Common libs -->
<!-- <spring_version>4.3.30.RELEASE</spring_version> -->
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
<spring_security_version>5.8.12</spring_security_version>
<javassist_version>3.30.2-GA</javassist_version>
<bytebuddy.version>1.14.17</bytebuddy.version>
<netty_version>3.2.10.Final</netty_version>
<netty4_version>4.1.110.Final</netty4_version>
<netty4_version>4.1.111.Final</netty4_version>
<httpclient_version>4.5.14</httpclient_version>
<httpcore_version>4.4.16</httpcore_version>
<fastjson_version>1.2.83</fastjson_version>
Expand All @@ -119,13 +119,13 @@
<snakeyaml_version>2.2</snakeyaml_version>
<commons_lang3_version>3.14.0</commons_lang3_version>
<envoy_api_version>0.1.35</envoy_api_version>
<micrometer.version>1.13.0</micrometer.version>
<micrometer.version>1.13.1</micrometer.version>

<micrometer-tracing.version>1.3.0</micrometer-tracing.version>
<micrometer-tracing.version>1.3.1</micrometer-tracing.version>
<t_digest.version>3.3</t_digest.version>
<prometheus_client.version>0.16.0</prometheus_client.version>
<reactive.version>1.0.4</reactive.version>
<reactor.version>3.6.6</reactor.version>
<reactor.version>3.6.7</reactor.version>
<rxjava.version>2.2.21</rxjava.version>
<okhttp_version>3.14.9</okhttp_version>

Expand Down Expand Up @@ -170,7 +170,7 @@
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
<palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
<revision>3.2.14-SNAPSHOT</revision>
<revision>3.2.15-SNAPSHOT</revision>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<packaging>pom</packaging>

<properties>
<revision>3.2.14-SNAPSHOT</revision>
<revision>3.2.15-SNAPSHOT</revision>
<maven_flatten_version>1.6.0</maven_flatten_version>
<curator5_version>5.1.0</curator5_version>
<zookeeper_version>3.8.4</zookeeper_version>
Expand Down
2 changes: 1 addition & 1 deletion dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<packaging>pom</packaging>

<properties>
<revision>3.2.14-SNAPSHOT</revision>
<revision>3.2.15-SNAPSHOT</revision>
<maven_flatten_version>1.6.0</maven_flatten_version>
<curator_version>4.3.0</curator_version>
<zookeeper_version>3.4.14</zookeeper_version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.model.ConsumerModel;
import org.apache.dubbo.rpc.model.MethodDescriptor;
import org.apache.dubbo.rpc.model.ServiceModel;
import org.apache.dubbo.rpc.protocol.AbstractInvoker;
Expand Down Expand Up @@ -317,11 +318,18 @@ private Object rebuildValue(Invocation invocation, Invoker<?> invoker, Object or
}

Object value = originValue;
ClassLoader cl = Thread.currentThread().getContextClassLoader();
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
try {
ServiceModel consumerServiceModel = getUrl().getServiceModel();
if (consumerServiceModel != null) {
Thread.currentThread().setContextClassLoader(consumerServiceModel.getClassLoader());
// 1. By default, the classloader of the current Thread is the consumer class loader.
ClassLoader consumerClassLoader = contextClassLoader;
ServiceModel serviceModel = getUrl().getServiceModel();
// 2. If there is a ConsumerModel in the url, the classloader of the ConsumerModel is consumerLoader
if (Objects.nonNull(serviceModel) && serviceModel instanceof ConsumerModel) {
consumerClassLoader = serviceModel.getClassLoader();
}
// 3. request result copy
if (Objects.nonNull(consumerClassLoader)) {
Thread.currentThread().setContextClassLoader(consumerClassLoader);
Type[] returnTypes = RpcUtils.getReturnTypes(invocation);
if (returnTypes == null) {
return originValue;
Expand All @@ -334,7 +342,7 @@ private Object rebuildValue(Invocation invocation, Invoker<?> invoker, Object or
}
return value;
} finally {
Thread.currentThread().setContextClassLoader(cl);
Thread.currentThread().setContextClassLoader(contextClassLoader);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
</modules>

<properties>
<micrometer.version>1.13.0</micrometer.version>
<micrometer-tracing.version>1.3.0</micrometer-tracing.version>
<micrometer.version>1.13.1</micrometer.version>
<micrometer-tracing.version>1.3.1</micrometer-tracing.version>
<opentelemetry.version>1.39.0</opentelemetry.version>
<zipkin-reporter.version>3.4.0</zipkin-reporter.version>
<prometheus-client.version>0.16.0</prometheus-client.version>
Expand Down
2 changes: 1 addition & 1 deletion dubbo-test/dubbo-test-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<properties>
<skip_maven_deploy>true</skip_maven_deploy>
<slf4j-log4j12.version>1.7.33</slf4j-log4j12.version>
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
<!--<spring_version>4.0.9.RELEASE</spring_version>-->
<!--<spring_version>4.1.9.RELEASE</spring_version>-->
<!--<spring_version>4.2.4.RELEASE</spring_version>-->
Expand Down
2 changes: 1 addition & 1 deletion dubbo-test/dubbo-test-spring3.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<properties>
<skip_maven_deploy>true</skip_maven_deploy>
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion dubbo-test/dubbo-test-spring4.1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<properties>
<skip_maven_deploy>true</skip_maven_deploy>
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion dubbo-test/dubbo-test-spring4.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<properties>
<skip_maven_deploy>true</skip_maven_deploy>
<spring_version>5.3.36</spring_version>
<spring_version>5.3.37</spring_version>
</properties>

<dependencyManagement>
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
<file_encoding>UTF-8</file_encoding>
<!-- Maven plugins -->
<maven_jar_version>3.4.1</maven_jar_version>
<maven_surefire_version>3.2.5</maven_surefire_version>
<maven_failsafe_version>3.2.5</maven_failsafe_version>
<maven_surefire_version>3.3.0</maven_surefire_version>
<maven_failsafe_version>3.3.0</maven_failsafe_version>
<maven_deploy_version>2.8.2</maven_deploy_version>
<maven_compiler_version>3.13.0</maven_compiler_version>
<maven_source_version>3.3.1</maven_source_version>
Expand All @@ -169,7 +169,7 @@
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
<palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
<revision>3.2.14-SNAPSHOT</revision>
<revision>3.2.15-SNAPSHOT</revision>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -290,7 +290,7 @@
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<version>3.7.0</version>
</plugin>
<plugin>
<!-- Do NOT upgrade -->
Expand Down Expand Up @@ -448,7 +448,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
Expand Down

0 comments on commit 679e989

Please sign in to comment.