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/21 03:18:58 UTC
[dubbo] branch 3.0 updated: fix multiple registry subscribe (#9050)
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 3df4f58 fix multiple registry subscribe (#9050)
3df4f58 is described below
commit 3df4f588b9084a33334d0b7822c18feeac5149cc
Author: haoyann <10...@qq.com>
AuthorDate: Thu Oct 21 11:18:42 2021 +0800
fix multiple registry subscribe (#9050)
---
.../apache/dubbo/registry/multiple/MultipleServiceDiscovery.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleServiceDiscovery.java b/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleServiceDiscovery.java
index cd09bed..c912d23 100644
--- a/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleServiceDiscovery.java
+++ b/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleServiceDiscovery.java
@@ -114,6 +114,15 @@ public class MultipleServiceDiscovery implements ServiceDiscovery {
}
@Override
+ public List<ServiceInstance> getInstances(String serviceName) {
+ List<ServiceInstance> serviceInstanceList = new ArrayList<>();
+ for (ServiceDiscovery serviceDiscovery : serviceDiscoveries.values()) {
+ serviceInstanceList.addAll(serviceDiscovery.getInstances(serviceName));
+ }
+ return serviceInstanceList;
+ }
+
+ @Override
public Page<ServiceInstance> getInstances(String serviceName, int offset, int pageSize, boolean healthyOnly)
throws NullPointerException, IllegalArgumentException, UnsupportedOperationException {