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-5237] fix NetUtils#isPreferIPV6Address() always return false #5238

Merged
merged 1 commit into from
Nov 8, 2019

Conversation

wangkezun
Copy link

@wangkezun wangkezun commented Oct 25, 2019

What is the purpose of the change

Fix #5237

Brief changelog

fix NetUtils#isPreferIPV6Address()

Verifying this change

XXXXX

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.

@wangkezun wangkezun changed the title fix NetUtils.isPreferIPV6Address bug [DUBBO-5237] fix NetUtils#isPreferIPV6Address() always return false Oct 25, 2019
@codecov-io
Copy link

codecov-io commented Oct 25, 2019

Codecov Report

Merging #5238 into master will increase coverage by 0.51%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #5238      +/-   ##
============================================
+ Coverage     63.57%   64.08%   +0.51%     
+ Complexity      463      461       -2     
============================================
  Files           791      770      -21     
  Lines         35225    33396    -1829     
  Branches       5503     5261     -242     
============================================
- Hits          22394    21402     -992     
+ Misses        10302     9565     -737     
+ Partials       2529     2429     -100
Impacted Files Coverage Δ Complexity Δ
...n/java/org/apache/dubbo/common/utils/NetUtils.java 67.85% <0%> (+0.79%) 0 <0> (ø) ⬇️
.../apache/dubbo/qos/protocol/QosProtocolWrapper.java 70.73% <0%> (-12.2%) 0% <0%> (ø)
...che/dubbo/remoting/transport/mina/MinaChannel.java 43.42% <0%> (-10.53%) 16% <0%> (-1%)
.../remoting/transport/netty4/NettyServerHandler.java 65.21% <0%> (-8.7%) 0% <0%> (ø)
.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java 79.16% <0%> (-8.34%) 0% <0%> (ø)
...ng/transport/dispatcher/all/AllChannelHandler.java 51.42% <0%> (-5.72%) 0% <0%> (ø)
...mmon/threadpool/support/AbortPolicyWithReport.java 83.78% <0%> (-5.41%) 0% <0%> (ø)
...ng/exchange/support/header/HeartbeatTimerTask.java 73.68% <0%> (-5.27%) 0% <0%> (ø)
.../org/apache/dubbo/remoting/ExecutionException.java 15.78% <0%> (-5.27%) 0% <0%> (ø)
...he/dubbo/remoting/transport/netty/NettyServer.java 70.17% <0%> (-3.51%) 8% <0%> (-1%)
... and 30 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 20351b0...33216a0. Read the comment docs.

@htynkn
Copy link
Member

htynkn commented Oct 25, 2019

I believe changes are introduced by this PR: #3953
@lexburner @beiwei30 Could you have a look and confirm if this is a bug?

@lexburner
Copy link
Contributor

I believe changes are introduced by this PR: #3953
@lexburner @beiwei30 Could you have a look and confirm if this is a bug?

You are right. The PR: #3953 remove the reachable check in the method isPreferIPV6Address.Such changes will cause always return false.
@wangkezun Thanks for your pr.

@lexburner lexburner merged commit dfa8499 into apache:master Nov 8, 2019
@wangkezun wangkezun deleted the fix-net-utils-bug branch November 8, 2019 06:05
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.

NetUtils#isPreferIPV6Address() always return false
4 participants