This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new d2d1b99b15 fix qos failure in non-registry scenarios (#10199)
d2d1b99b15 is described below
commit d2d1b99b15934a5b82dc53c743fb4210241667eb
Author: huazhongming <[email protected]>
AuthorDate: Fri Jun 24 19:42:15 2022 +0800
fix qos failure in non-registry scenarios (#10199)
* fix qos failure in non-registry scenarios
Signed-off-by: crazyhzm <[email protected]>
* remove useless import
Signed-off-by: crazyhzm <[email protected]>
---
.../org/apache/dubbo/qos/protocol/QosProtocolWrapper.java | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git
a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/protocol/QosProtocolWrapper.java
b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/protocol/QosProtocolWrapper.java
index 200ded454f..f0e420cc5b 100644
---
a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/protocol/QosProtocolWrapper.java
+++
b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/protocol/QosProtocolWrapper.java
@@ -20,7 +20,6 @@ import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
-import org.apache.dubbo.common.utils.UrlUtils;
import org.apache.dubbo.qos.common.QosConstants;
import org.apache.dubbo.qos.server.Server;
import org.apache.dubbo.rpc.Exporter;
@@ -69,19 +68,13 @@ public class QosProtocolWrapper implements Protocol,
ScopeModelAware {
@Override
public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException {
- if (UrlUtils.isRegistry(invoker.getUrl())) {
- startQosServer(invoker.getUrl());
- return protocol.export(invoker);
- }
+ startQosServer(invoker.getUrl());
return protocol.export(invoker);
}
@Override
public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
- if (UrlUtils.isRegistry(url)) {
- startQosServer(url);
- return protocol.refer(type, url);
- }
+ startQosServer(url);
return protocol.refer(type, url);
}
@@ -105,8 +98,8 @@ public class QosProtocolWrapper implements Protocol,
ScopeModelAware {
boolean qosEnable = url.getParameter(QOS_ENABLE, true);
if (!qosEnable) {
logger.info("qos won't be started because it is disabled. " +
- "Please check dubbo.application.qos.enable is
configured either in system property, " +
- "dubbo.properties or XML/spring-boot configuration.");
+ "Please check dubbo.application.qos.enable is configured
either in system property, " +
+ "dubbo.properties or XML/spring-boot configuration.");
return;
}