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

[Dubbo-2.7.2] fix registery urls increase forever when recreate reference proxy #4109

Merged
merged 1 commit into from
May 23, 2019

Conversation

vio-lin
Copy link
Contributor

@vio-lin vio-lin commented May 22, 2019

fix issue #4107

What is the purpose of the change

when client retry init reference, clear registry urls to avoid OOM.
the registry url contains timestamp value, it can not change urls from list to set.

Brief changelog

do clear urls when in create remote proxy

Verifying this change

do clear urls when create remote proxy

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

  • 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.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. 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 sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-io
Copy link

Codecov Report

Merging #4109 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #4109      +/-   ##
============================================
+ Coverage     62.63%   62.68%   +0.04%     
- Complexity      543      545       +2     
============================================
  Files           762      762              
  Lines         32752    32753       +1     
  Branches       5162     5162              
============================================
+ Hits          20515    20530      +15     
+ Misses         9876     9862      -14     
  Partials       2361     2361
Impacted Files Coverage Δ Complexity Δ
.../java/org/apache/dubbo/config/ReferenceConfig.java 59.85% <100%> (+0.14%) 0 <0> (ø) ⬇️
...ache/dubbo/remoting/transport/AbstractChannel.java 75% <0%> (-12.5%) 0% <0%> (ø)
.../apache/dubbo/remoting/transport/AbstractPeer.java 63.04% <0%> (ø) 0% <0%> (ø) ⬇️
...dubbo/remoting/exchange/support/DefaultFuture.java 75.16% <0%> (+1.96%) 0% <0%> (ø) ⬇️
...e/dubbo/remoting/transport/netty/NettyChannel.java 62.35% <0%> (+4.7%) 21% <0%> (+1%) ⬆️
...che/dubbo/remoting/transport/mina/MinaChannel.java 53.94% <0%> (+10.52%) 17% <0%> (+1%) ⬆️

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 3fc6909...133078a. Read the comment docs.

Copy link

@Moriadry-zz Moriadry-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this line will change the logic of urls, we will lose contents of urls every time calling createProxy method . I believe it's not a good way to prevent infinite retries and OOM.

How do u think?

@vio-lin
Copy link
Contributor Author

vio-lin commented May 22, 2019

this urls

Hi, this line will change the logic of urls, we will lose contents of urls every time calling createProxy method . I believe it's not a good way to prevent infinite retries and OOM.
How do u think?

I think this createProxy() is a method to get a new client. It happended when last getProxy() failed and
initialized = false. It isn't nessary to keep the old,failed urls of reference , when we getProxy next time.
As the description of urls The url of the reference service,we should keep the last and success urls.

Copy link
Member

@beiwei30 beiwei30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@beiwei30 beiwei30 merged commit 13e876e into apache:master May 23, 2019
@vio-lin vio-lin deleted the fix-retry-refer-OOM branch June 25, 2019 11:25
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