Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dubbo-7459]Fix passing wrong parameter when calling MigrationInvoker.compareAddresses() #7460

Merged
merged 2 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.util.Optional;

import static org.apache.dubbo.common.constants.RegistryConstants.INIT;

public class MigrationRule {
private static final String DUBBO_SERVICEDISCOVERY_MIGRATION_KEY = "dubbo.application.service-discovery.migration";
public static final String DUBBO_SERVICEDISCOVERY_MIGRATION_GROUP = "MIGRATION";
Expand Down Expand Up @@ -62,7 +64,7 @@ public static MigrationRule parse(String rawRule) {
return getMigrationRule(null);
}

if (StringUtils.isBlank(rawRule) || "INIT".equals(rawRule)) {
if (StringUtils.isBlank(rawRule) || INIT.equals(rawRule)) {
String step = (String)configuration.getInternalProperty(DUBBO_SERVICEDISCOVERY_MIGRATION_KEY);
return getMigrationRule(step);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ public synchronized void migrateToServiceDiscoveryInvoker(boolean forceMigrate)
refreshServiceDiscoveryInvoker();
refreshInterfaceInvoker();
setListener(invoker, () -> {
this.compareAddresses(invoker, serviceDiscoveryInvoker);
this.compareAddresses(serviceDiscoveryInvoker, invoker);
});
setListener(serviceDiscoveryInvoker, () -> {
this.compareAddresses(invoker, serviceDiscoveryInvoker);
this.compareAddresses(serviceDiscoveryInvoker, invoker);
});
} else {
refreshServiceDiscoveryInvoker();
Expand Down