You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2020/11/10 02:58:07 UTC
[dubbo] branch 3.0-migration-pom created (now 5647beb)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a change to branch 3.0-migration-pom
in repository https://gitbox.apache.org/repos/asf/dubbo.git.
at 5647beb fix rule ip support
This branch includes the following new commits:
new 5647beb fix rule ip support
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[dubbo] 01/01: fix rule ip support
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.0-migration-pom
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit 5647bebfa32b19c8a513dba61cd9c4d2c01a2bfd
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Nov 10 10:52:19 2020 +0800
fix rule ip support
---
.../apache/dubbo/registry/client/migration/MigrationRuleHandler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java
index ab802f8..cc79a07 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java
@@ -57,7 +57,7 @@ public class MigrationRuleHandler<T> {
try {
rule = MigrationRule.parse(rawRule);
// FIXME, consumerURL.getHost() might not exactly the ip expected.
- if (rule.getTargetIps() != null && rule.getTargetIps().contains(consumerURL.getHost())) {
+ if (rule.getTargetIps() == null || (rule.getTargetIps() != null && rule.getTargetIps().contains(consumerURL.getHost()))) {
setMigrationRule(rule);
step = rule.getStep(consumerURL.getServiceKey());
threshold = rule.getThreshold(consumerURL.getServiceKey());