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

fix issue-8715 on master: failback retries=0 should only invoke once #8743

Merged
merged 1 commit into from Sep 11, 2021

Conversation

changfubai
Copy link
Contributor

What is the purpose of the change

fix #8715

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field 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.
  • 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.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • 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 sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2021

Codecov Report

Merging #8743 (81c9d81) into master (abb2109) will decrease coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #8743      +/-   ##
============================================
- Coverage     61.04%   61.02%   -0.03%     
+ Complexity      448      447       -1     
============================================
  Files          1097     1097              
  Lines         44383    44384       +1     
  Branches       6460     6461       +1     
============================================
- Hits          27093    27084       -9     
- Misses        14309    14314       +5     
- Partials       2981     2986       +5     
Impacted Files Coverage Δ
...bo/rpc/cluster/support/FailbackClusterInvoker.java 51.61% <50.00%> (-0.85%) ⬇️
...port/identifier/BaseServiceMetadataIdentifier.java 53.57% <0.00%> (-7.15%) ⬇️
...he/dubbo/remoting/transport/netty/NettyServer.java 70.17% <0.00%> (-3.51%) ⬇️
...etadata/report/support/AbstractMetadataReport.java 56.31% <0.00%> (-3.40%) ⬇️
.../remoting/transport/netty4/NettyClientHandler.java 83.05% <0.00%> (-3.39%) ⬇️
...ting/exchange/support/header/HeartbeatHandler.java 90.69% <0.00%> (-2.33%) ⬇️
...pache/dubbo/registry/support/AbstractRegistry.java 78.88% <0.00%> (-1.49%) ⬇️
...apache/dubbo/common/extension/ExtensionLoader.java 80.89% <0.00%> (-0.22%) ⬇️
.../apache/dubbo/config/bootstrap/DubboBootstrap.java 54.58% <0.00%> (-0.16%) ⬇️
...g/apache/dubbo/registry/consul/ConsulRegistry.java 60.58% <0.00%> (+0.58%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update abb2109...81c9d81. Read the comment docs.

@AlbumenJ AlbumenJ merged commit d3773a7 into apache:master Sep 11, 2021
@283883031
Copy link

retries param didn't work well when it is 0.
I set retries param is 0, But not work.
I see it:
public FailbackClusterInvoker(Directory directory) {
super(directory);

    int retriesConfig = getUrl().getParameter(RETRIES_KEY, DEFAULT_FAILBACK_TIMES);
    if (retriesConfig <= 0) {
        retriesConfig = DEFAULT_FAILBACK_TIMES;
    }
    int failbackTasksConfig = getUrl().getParameter(FAIL_BACK_TASKS_KEY, DEFAULT_FAILBACK_TASKS);
    if (failbackTasksConfig <= 0) {
        failbackTasksConfig = DEFAULT_FAILBACK_TASKS;
    }
    retries = retriesConfig;
    failbackTasks = failbackTasksConfig;
}

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.

None yet

4 participants