You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by ra...@apache.org on 2025/11/17 16:06:44 UTC
(dubbo) branch 3.3 updated: fix: thread safety RegistryDirectory (#15775)
This is an automated email from the ASF dual-hosted git repository.
rainyu pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 58d738682f fix: thread safety RegistryDirectory (#15775)
58d738682f is described below
commit 58d738682f02f0a315d72857b594eb9eace5e13d
Author: flyforeverth <38...@users.noreply.github.com>
AuthorDate: Tue Nov 18 00:06:38 2025 +0800
fix: thread safety RegistryDirectory (#15775)
---
.../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 77b661d84f..8c48ccb72c 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
@@ -58,6 +58,7 @@ import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Collectors;
import static org.apache.dubbo.common.constants.CommonConstants.APPLICATION_KEY;
@@ -826,7 +827,7 @@ public class RegistryDirectory<T> extends DynamicDirectory<T> {
}
private static class ConsumerConfigurationListener extends AbstractConfiguratorListener {
- List<RegistryDirectory> listeners = new ArrayList<>();
+ List<RegistryDirectory> listeners = new CopyOnWriteArrayList<>();
ConsumerConfigurationListener(ModuleModel moduleModel) {
super(moduleModel);