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/09 07:49:29 UTC

[GitHub] [dubbo] coderzSSS opened a new issue #8741: Dubbo service with tag cause no provider found issue

coderzSSS opened a new issue #8741:
URL: https://github.com/apache/dubbo/issues/8741


   
   ### Environment
   
   * Dubbo version: 3.0.2.1
   * Operating System version: Linux 4.14.152-127.182.amzn2.x86_64
   * Java version: 1.8_310
   
   ### Steps to reproduce this issue
   
   1. A provider annotated with @DubboService(tag = 'XXX')
   2. A Consumer annotated with @DubboReference(tag = 'XXX')
   3. Consumer will complain no provider found
   
   Possible Cause:
   1. TagDynamicStateRouter#line 112 will hardcode tag as 'noTag' even the service has a valid tag but without tagRouterRule set
   ```
   invocation.setAttachment(TAG_KEY, NO_TAG);
   ```
   2. TagStaticStateRouter#64 try to locate the tag with below code, however the tag attachment already set as noTag from previous router, hence the tag is always noTag even the url has a valid tag set.
   ```
    String tag = StringUtils.isEmpty(invocation.getAttachment(TAG_KEY)) ? url.getParameter(TAG_KEY) :
               invocation.getAttachment(TAG_KEY);
           if (StringUtils.isEmpty(tag)) {
               tag = NO_TAG;
           }
   ```
   
   Possible Fix:
   replace StringUtils.isEmpty as below function:
   ```
   boolean isNoTag(String value) {
         return StringUtils.isEmpty(value) || NO_TAG.equals(value));
   }
   ```


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


[GitHub] [dubbo] AlbumenJ closed issue #8741: Dubbo service with tag cause no provider found issue

Posted by GitBox <gi...@apache.org>.
AlbumenJ closed issue #8741:
URL: https://github.com/apache/dubbo/issues/8741


   


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


[GitHub] [dubbo] wangchengming666 commented on issue #8741: Dubbo service with tag cause no provider found issue

Posted by GitBox <gi...@apache.org>.
wangchengming666 commented on issue #8741:
URL: https://github.com/apache/dubbo/issues/8741#issuecomment-915900341


   > will you fix it ? or I can submit it.
   
   just do it!


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


[GitHub] [dubbo] changfubai commented on issue #8741: Dubbo service with tag cause no provider found issue

Posted by GitBox <gi...@apache.org>.
changfubai commented on issue #8741:
URL: https://github.com/apache/dubbo/issues/8741#issuecomment-915911644


   I'll fix it~


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


[GitHub] [dubbo] changfubai commented on issue #8741: Dubbo service with tag cause no provider found issue

Posted by GitBox <gi...@apache.org>.
changfubai commented on issue #8741:
URL: https://github.com/apache/dubbo/issues/8741#issuecomment-915860147


   will you fix it ? or I can submit it.


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


[GitHub] [dubbo] coderzSSS commented on issue #8741: Dubbo service with tag cause no provider found issue

Posted by GitBox <gi...@apache.org>.
coderzSSS commented on issue #8741:
URL: https://github.com/apache/dubbo/issues/8741#issuecomment-916037186


   thx @changfubai 


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


[GitHub] [dubbo] niothink commented on issue #8741: Dubbo service with tag cause no provider found issue

Posted by GitBox <gi...@apache.org>.
niothink commented on issue #8741:
URL: https://github.com/apache/dubbo/issues/8741#issuecomment-915897202


   > I also encountered this problem when I upgraded my application,then rollback ro 2.7.x


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