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

Parameter validation exception changed to RpcException.BIZ_EXCEPTION. #1031

Closed

Conversation

zhangyinyue
Copy link
Contributor

What is the purpose of the change

1、避免使用重试机制时,参数检验异常信息有可能丢失(重试时只记录最后一次异常,最后一次有可能是网络原因,会覆盖参数检验异常)
2、使用重试机制时,减少重试次数

Brief changelog

参数检验异常改为RpcException的BIZ_EXCEPTION异常,参数检验信息应该是业务信息

Verifying this change

在FailoverClusterInvoker中,执行

          catch (RpcException e) {
                if (e.isBiz()) { // biz exception.
                    throw e;
                }
                le = e;
            } 

时会直接抛出参数检验异常,不用再多次重试

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

…业务信息

1、避免使用重试机制时,参数检验异常信息有可能丢失(重试时只记录最后一次异常,最后一次有可能是网络原因,会覆盖参数检验异常)
2、使用重试机制时,减少重试次数
@chickenlj chickenlj changed the title 参数检验异常改为RpcException的BIZ_EXCEPTION异常,参数检验信息应该是业务信息 Parameter validation exception changed to RpcException.BIZ_EXCEPTION. Jan 17, 2018
@chickenlj
Copy link
Contributor

I think it will be more reasonable to return a RpcResult.

@chickenlj chickenlj added this to the 2.5.9 milestone Jan 18, 2018
@chickenlj chickenlj closed this Jan 18, 2018
@chickenlj chickenlj modified the milestones: 2.5.9, 2.6.1 Mar 16, 2018
rolandhe pushed a commit to rolandhe/dubbo that referenced this pull request Sep 9, 2019
@dangle253280 dangle253280 mentioned this pull request Feb 23, 2021
2 tasks
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

Successfully merging this pull request may close these issues.

2 participants