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 2022/04/01 16:05:21 UTC

[GitHub] [dubbo] saleson opened a new issue #9877: dubbo service 设置executes参数,同时consumer通过generic方式访问,会抛LIMIT_EXCEEDED_EXCEPTION: greater than
saleson opened a new issue #9877:
URL: https://github.com/apache/dubbo/issues/9877


   
   
   ### Environment
   
   * Dubbo version: 3.0.5
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. provider 设置<dubbo:service executes=10
   2. consumer 通过generic方式访问上述provider的Service
   3. 在超过10次(executes参数值)后,ExecuteLimitFilter抛出code为LIMIT_EXCEEDED_EXCEPTION的异常
   
   在dubbo 2.7版本中也出现过该问题,后修复,现在又重新出现。[配置<dubbo:provider ... />的executes参数引发的bug #5052](https://github.com/apache/dubbo/issues/5052)   
   #5052 
   
   
   
   原因:
   在ExecuteLimitFilter.invoke()方法中执行invocation.getMethodName()返回的 Service的方法名,但是在ExecuteLimitFilter.onResponse()或者ExecuteLimitFilter.onError()方法中执行invocation.getMethodName()返回的却是 "$invoke",是GenericService.invoke()的方法名。
   造成这样的根因是GenericFilter.invoke()方法中将新创建了一个RpcInvocation对象,其Service和Method等信息都调整过,后将该RpcInvocation对象往后传递,所以在ExecuteLimitFilter.invoke()方法中执行invocation.getMethodName()返回的 Service的方法名。
   但是在CallbackRegistrationInvoker.invoke()方法中,在执行方法filterInvoker.invoke()方法后,再执行asyncResult.whenCompleteWithContext()方法时,向下传递的却是原来未调整过的RpcInvocation对象,导致ExecuteLimitFilter的onResponse()、onError()这两个方法执行invocation.getMethodName()获取到的方法名与ExecuteLimitFilter.invoke()方法的不一样,从而取到的RpcStatus对象不同,最终的计算与预期南辕北辙。
   
   
   


-- 
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] saleson commented on issue #9877: dubbo service 设置executes参数,同时consumer通过generic方式访问,会抛LIMIT_EXCEEDED_EXCEPTION: greater than Posted by GitBox <gi...@apache.org>.
saleson commented on issue #9877:
URL: https://github.com/apache/dubbo/issues/9877#issuecomment-1086564176


   > 
   
   好的, 稍候我提个pr


-- 
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] BurningCN commented on issue #9877: dubbo service 设置executes参数,同时consumer通过generic方式访问,会抛LIMIT_EXCEEDED_EXCEPTION: greater than Posted by GitBox <gi...@apache.org>.
BurningCN commented on issue #9877:
URL: https://github.com/apache/dubbo/issues/9877#issuecomment-1086563711


   按照你的描述可能确实存在问题,稍晚点我看一下。或者你方便的话,可以尝试提交个pr修复这个问题


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