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-1431] Fix endless loop bug while NetUtils.getLocalHost() throw exception #1878

Closed
wants to merge 4 commits into from

Conversation

leiwei2094
Copy link
Contributor

What is the purpose of the change

Fix a bug: when NetUtils.getLocalHost() throw an exception, an endless loop will occur:
NetUtils.getLocalHost() -> FailsafeLogger.appendContextMessage() -> NetUtils.getLocalHost()

Brief changelog

When NetUtils.getLocalHost() throw exception, do not append ip information to log message, to avoid endless loop.

Verifying this change

Unit test passed.

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 #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 integration-test in test module.
  • Run mvn clean install -DskipTests & 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 #1878 into master will decrease coverage by 0.04%.
The diff coverage is 7.14%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1878      +/-   ##
============================================
- Coverage     42.56%   42.51%   -0.05%     
+ Complexity     4710     4708       -2     
============================================
  Files           646      646              
  Lines         30657    30665       +8     
  Branches       5378     5378              
============================================
- Hits          13049    13038      -11     
- Misses        15595    15612      +17     
- Partials       2013     2015       +2
Impacted Files Coverage Δ Complexity Δ
...ba/dubbo/common/logger/support/FailsafeLogger.java 70% <0%> (-6.83%) 20 <0> (ø)
.../java/com/alibaba/dubbo/common/utils/NetUtils.java 15.78% <16.66%> (ø) 13 <1> (ø) ⬇️
...va/com/alibaba/dubbo/config/DubboShutdownHook.java 43.47% <0%> (-30.44%) 5% <0%> (-1%)
...om/alibaba/dubbo/rpc/filter/ActiveLimitFilter.java 83.33% <0%> (-5.56%) 6% <0%> (-1%)
.../com/alibaba/dubbo/monitor/dubbo/DubboMonitor.java 87.85% <0%> (-1.87%) 15% <0%> (ø)

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 a144d28...08a944b. Read the comment docs.

@beiwei30
Copy link
Member

I notice there are three different changes mixed together. For #1431 I've checked in a different solution. Pls. checkin protobuf support only, and consider to add demo code in https://github.com/dubbo/dubbo-samples

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.

pls. check in protobuf support only. The solution for issue#1431 is already in.

@leiwei2094 leiwei2094 closed this Jun 12, 2018
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.

3 participants