You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/01 01:20:15 UTC
[GitHub] [dubbo] plusmancn commented on issue #8605: Does MetadataService really need the external Activate filter chain? And there is no filter option to disable it.
plusmancn commented on issue #8605:
URL: https://github.com/apache/dubbo/issues/8605#issuecomment-909783875
> implementing an internal service creation process instead of creating from serviceconfig
What's the benefit against the cost? The original purpose was only to guarantee the safety of internal service, and moreover `ProtocolFilterWrapper` have already implemented some feature which is similar to whitelist.
```java
// => org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper
@Override
public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException {
// => Here, DON'T wrap with filter chain
if (UrlUtils.isRegistry(invoker.getUrl())) {
return protocol.export(invoker);
}
return protocol.export(builder.buildInvokerChain(invoker, SERVICE_FILTER_KEY, CommonConstants.PROVIDER));
}
@Override
public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
if (UrlUtils.isRegistry(url)) {
return protocol.refer(type, url);
}
return builder.buildInvokerChain(protocol.refer(type, url), REFERENCE_FILTER_KEY, CommonConstants.CONSUMER);
}
```
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org