This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 33cb8c6116 Init deadlock (#10503)
33cb8c6116 is described below
commit 33cb8c61169db33fa8811b0aafa1c6b1b65da345
Author: Owen.Cai <[email protected]>
AuthorDate: Thu Aug 25 15:41:33 2022 +0800
Init deadlock (#10503)
* try fix deadlock
* change code style
* change code style
* commit private
---
.../apache/dubbo/config/deploy/DefaultModuleDeployer.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultModuleDeployer.java
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultModuleDeployer.java
index a609e88080..5b73adb223 100644
---
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultModuleDeployer.java
+++
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultModuleDeployer.java
@@ -125,7 +125,14 @@ public class DefaultModuleDeployer extends
AbstractDeployer<ModuleModel> impleme
}
@Override
- public synchronized Future start() throws IllegalStateException {
+ public Future start() throws IllegalStateException {
+ // initialize,maybe deadlock applicationDeployer lock & moduleDeployer
lock
+ applicationDeployer.initialize();
+
+ return startSync();
+ }
+
+ private synchronized Future startSync() throws IllegalStateException {
if (isStopping() || isStopped() || isFailed()) {
throw new IllegalStateException(getIdentifier() + " is stopping or
stopped, can not start again");
}
@@ -137,8 +144,7 @@ public class DefaultModuleDeployer extends
AbstractDeployer<ModuleModel> impleme
onModuleStarting();
- // initialize
- applicationDeployer.initialize();
+
initialize();
// export services