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 83d94f2 fix re-start override dynamic config (#8190)
83d94f2 is described below
commit 83d94f2b43e66f1c14323acaca45c3c63533b8fd
Author: Albumen Kevin <[email protected]>
AuthorDate: Thu Jul 1 10:44:08 2021 +0800
fix re-start override dynamic config (#8190)
---
.../org/apache/dubbo/config/bootstrap/DubboBootstrap.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
index 592c148..8c0969e 100644
---
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
+++
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java
@@ -1084,7 +1084,6 @@ public class DubboBootstrap {
public DubboBootstrap start() {
if (started.compareAndSet(false, true)) {
startup.set(false);
- initialized.set(false);
shutdown.set(false);
awaited.set(false);
@@ -1289,8 +1288,10 @@ public class DubboBootstrap {
ExecutorService executor =
executorRepository.getExportReferExecutor();
CompletableFuture<Void> future = CompletableFuture.runAsync(()
-> {
try {
- sc.export();
- exportedServices.add(sc);
+ if (!sc.isExported()) {
+ sc.export();
+ exportedServices.add(sc);
+ }
} catch (Throwable t) {
logger.error("export async catch error : " +
t.getMessage(), t);
}
@@ -1298,8 +1299,10 @@ public class DubboBootstrap {
asyncExportingFutures.add(future);
} else {
- sc.export();
- exportedServices.add(sc);
+ if (!sc.isExported()) {
+ sc.export();
+ exportedServices.add(sc);
+ }
}
}
}