This is an automated email from the ASF dual-hosted git repository.
huxing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 3a05378 Simply TagRouter (#2924)
3a05378 is described below
commit 3a05378a2f9f1d183c33882c585a9d2a90445ef8
Author: kexianjun <[email protected]>
AuthorDate: Mon Dec 10 11:25:22 2018 +0800
Simply TagRouter (#2924)
---
.../org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java
index b133cd1..c7526ce 100644
---
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java
+++
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java
@@ -72,18 +72,10 @@ public class TagRouter implements Router {
result.add(invoker);
}
}
- // If no invoker be selected, downgrade to normal invokers
- if (result.isEmpty()) {
- for (Invoker<T> invoker : invokers) {
- if
(StringUtils.isEmpty(invoker.getUrl().getParameter(Constants.TAG_KEY))) {
- result.add(invoker);
- }
- }
- }
- // Normal request
- } else {
+ }
+ // If Constants.REQUEST_TAG_KEY unspecified or no invoker be
selected, downgrade to normal invokers
+ if (result.isEmpty()) {
for (Invoker<T> invoker : invokers) {
- // Can't access tag invoker,only normal invoker should be
selected
if
(StringUtils.isEmpty(invoker.getUrl().getParameter(Constants.TAG_KEY))) {
result.add(invoker);
}