Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumer can't set correct retries via generic invocation. #6369

Closed
2 tasks done
shadowmind opened this issue Jun 24, 2020 · 0 comments
Closed
2 tasks done

Consumer can't set correct retries via generic invocation. #6369

shadowmind opened this issue Jun 24, 2020 · 0 comments

Comments

@shadowmind
Copy link

shadowmind commented Jun 24, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.6.x
  • Operating System version: MacOS 10.12.6
  • Java version: 1.8.0_181

Steps to reproduce this issue

  1. Consumer set retries and invoke any provider via generic invocation.

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

Get the correct retries in FailoverClusterInvoker.

public Result doInvoke(Invocation invocation, final List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException { 
        List<Invoker<T>> copyinvokers = invokers;
        checkInvokers(copyinvokers, invocation);
        String methodName = RpcUtils.getMethodName(invocation);
        int len = getUrl().getMethodParameter(methodName, Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1;
        if (len <= 0) {
            len = 1;
        }
        ...

Actual Result

Get the default retires cause use incorrect method name.

public Result doInvoke(Invocation invocation, final List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
        List<Invoker<T>> copyinvokers = invokers;
        checkInvokers(copyinvokers, invocation);
        int len = getUrl().getMethodParameter(invocation.getMethodName(), Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1;
        if (len <= 0) {
            len = 1;
        }
        ...

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants