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 2021/10/13 07:45:20 UTC
[dubbo] branch 3.0 updated: [3.0] Fix #8985,
add logic for check localMetadataService.blockUntilUpdated state
(#9002)
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 ce443c0 [3.0] Fix #8985, add logic for check localMetadataService.blockUntilUpdated state (#9002)
ce443c0 is described below
commit ce443c04a1ac70434a0c443ccdbef62827844fc0
Author: Wang Chengming <63...@qq.com>
AuthorDate: Wed Oct 13 15:45:09 2021 +0800
[3.0] Fix #8985, add logic for check localMetadataService.blockUntilUpdated state (#9002)
* fix #8985
* fix #8985, add logic for check localMetadataService.blockUntilUpdated state
---
.../org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java
index 673d997..7da8db5 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java
@@ -709,7 +709,9 @@ public class DefaultApplicationDeployer extends AbstractDeployer<ApplicationMode
// scheduled task for updating Metadata and ServiceInstance
asyncMetadataFuture = executorRepository.nextScheduledExecutor().scheduleAtFixedRate(() -> {
InMemoryWritableMetadataService localMetadataService = (InMemoryWritableMetadataService) WritableMetadataService.getDefaultExtension(applicationModel);
- localMetadataService.blockUntilUpdated();
+ if (!applicationModel.getDeployer().isStopping() || !applicationModel.getDeployer().isStopped()) {
+ localMetadataService.blockUntilUpdated();
+ }
try {
ServiceInstanceMetadataUtils.refreshMetadataAndInstance(serviceInstance);
} catch (Exception e) {