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

[ISSUE-#7339] Didn't judge check in serviceDiscoveryRegistry #7340

Merged
merged 2 commits into from
Mar 11, 2021
Merged
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 @@ -52,7 +52,6 @@
import static java.util.Collections.unmodifiableSet;
import static java.util.stream.Collectors.toSet;
import static java.util.stream.Stream.of;
import static org.apache.dubbo.common.constants.CommonConstants.CHECK_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_CHAR_SEPARATOR;
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
Expand Down Expand Up @@ -260,13 +259,10 @@ public final void subscribe(URL url, NotifyListener listener) {
public void doSubscribe(URL url, NotifyListener listener) {
writableMetadataService.subscribeURL(url);

boolean check = url.getParameter(CHECK_KEY, false);
Set<String> serviceNames = getServices(url, listener);

if (CollectionUtils.isEmpty(serviceNames)) {
if (check) {
throw new IllegalStateException("Should has at least one way to know which services this interface belongs to, subscription url: " + url);
}
logger.warn("Should has at least one way to know which services this interface belongs to, subscription url: " + url);
return;
}

Expand Down Expand Up @@ -499,4 +495,4 @@ public void onEvent(MappingChangedEvent event) {
}
}
}
}
}