chickenlj commented on a change in pull request #9645:
URL: https://github.com/apache/dubbo/pull/9645#discussion_r826981031
##########
File path:
dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmProtocol.java
##########
@@ -88,7 +98,15 @@ public int getDefaultPort() {
@Override
public <T> Invoker<T> protocolBindingRefer(Class<T> serviceType, URL url)
throws RpcException {
- return new InjvmInvoker<T>(serviceType, url, url.getServiceKey(),
exporterMap);
+ // group="a,b" or group="*"
+ String group = url.getParameter(GROUP_KEY);
+ if (StringUtils.isNotEmpty(group)) {
+ if ((COMMA_SPLIT_PATTERN.split(group)).length > 1 ||
"*".equals(group)) {
+ return doCreateInvoker(url,
Cluster.getCluster(url.getScopeModel(), MergeableCluster.NAME), serviceType);
+ }
+ }
+ Cluster cluster = Cluster.getCluster(url.getScopeModel(),
url.getParameter(CLUSTER_KEY));
Review comment:
Can we just return `InjvmInvoker` directly for empty or single accurate
group? Is cluster still necessary?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]