wuwen5 commented on issue #7519:
URL: https://github.com/apache/dubbo/issues/7519#issuecomment-1015114884


   @AlbumenJ @CrazyHZM   这个问题简单验证了一下,的确是不生效啊。
   
   ```TagRouter```
   ```java
   private <T> List<Invoker<T>> filterUsingStaticTag(List<Invoker<T>> invokers, 
URL url, Invocation invocation) {
           List<Invoker<T>> result;
           // Dynamic param
           String tag = StringUtils.isEmpty(invocation.getAttachment(TAG_KEY)) 
? url.getParameter(TAG_KEY) :
                   invocation.getAttachment(TAG_KEY);
           // Tag request
           if (!StringUtils.isEmpty(tag)) {
               // invoker.getUrl().getParameter(TAG_KEY)这里拿不到值的,详见#9512
               result = filterInvoker(invokers, invoker -> 
tag.equals(invoker.getUrl().getParameter(TAG_KEY)));
               if (CollectionUtils.isEmpty(result) && 
!isForceUseTag(invocation)) {
                   result = filterInvoker(invokers, invoker -> 
StringUtils.isEmpty(invoker.getUrl().getParameter(TAG_KEY)));
               }
           } else {
               result = filterInvoker(invokers, invoker -> 
StringUtils.isEmpty(invoker.getUrl().getParameter(TAG_KEY)));
           }
           return result;
       }
   ```


-- 
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]

Reply via email to