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/03/24 07:08:58 UTC
[dubbo] branch master updated: [ISSUE-#6763] Make refreshInvoker
synchronized (#7082)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new f3bb86f [ISSUE-#6763] Make refreshInvoker synchronized (#7082)
f3bb86f is described below
commit f3bb86f6d43ec114f451caadca96d2a377cde6a0
Author: 赵延 <10...@qq.com>
AuthorDate: Wed Mar 24 15:08:34 2021 +0800
[ISSUE-#6763] Make refreshInvoker synchronized (#7082)
* make refreshInvoker synchronized, to avoid config-center change and registry-center change concurrency.
* make refreshInvoker synchronized, to avoid config-center change and registry-center change concurrency.
* modify the comment.
* remove comment.
---
.../java/org/apache/dubbo/registry/integration/RegistryDirectory.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
index ba47904..49f006f 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
@@ -152,7 +152,8 @@ public class RegistryDirectory<T> extends DynamicDirectory<T> implements NotifyL
return "";
}
- private void refreshOverrideAndInvoker(List<URL> urls) {
+ // RefreshOverrideAndInvoker will be executed by registryCenter and configCenter, so it should be synchronized.
+ private synchronized void refreshOverrideAndInvoker(List<URL> urls) {
// mock zookeeper://xxx?mock=return null
overrideDirectoryUrl();
refreshInvoker(urls);