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-4445] Fix native-thrift cannot run within docker instance #4445 #5002

Merged
merged 1 commit into from
Sep 11, 2019
Merged

[Dubbo-4445] Fix native-thrift cannot run within docker instance #4445 #5002

merged 1 commit into from
Sep 11, 2019

Conversation

guohao
Copy link
Contributor

@guohao guohao commented Sep 5, 2019

What is the purpose of the change

fix #4445

Brief changelog

XXXXX

Verifying this change

Start a Thrift service in container and invoke from outside.

  1. https://github.com/apache/dubbo-samples/tree/master/dubbo-samples-thrift
  2. https://github.com/apache/dubbo-samples/tree/master/dubbo-samples-docker

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 #5002 into master will decrease coverage by 0.04%.
The diff coverage is 60%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #5002      +/-   ##
============================================
- Coverage     63.96%   63.92%   -0.05%     
+ Complexity      452      451       -1     
============================================
  Files           769      769              
  Lines         33163    33554     +391     
  Branches       5229     5358     +129     
============================================
+ Hits          21214    21449     +235     
- Misses         9526     9656     +130     
- Partials       2423     2449      +26
Impacted Files Coverage Δ Complexity Δ
...ubbo/rpc/protocol/nativethrift/ThriftProtocol.java 70.73% <60%> (-1.07%) 8 <0> (ø)
.../apache/dubbo/qos/protocol/QosProtocolWrapper.java 65.85% <0%> (-17.08%) 0% <0%> (ø)
...e/dubbo/remoting/transport/netty/NettyChannel.java 53.76% <0%> (-3.89%) 21% <0%> (+1%)
...he/dubbo/remoting/transport/netty/NettyServer.java 69.64% <0%> (-3.58%) 8% <0%> (-1%)
.../dubbo/remoting/transport/netty4/NettyChannel.java 62.36% <0%> (-3.52%) 0% <0%> (ø)
.../rpc/protocol/dubbo/LazyConnectExchangeClient.java 56.47% <0%> (-2.36%) 0% <0%> (ø)
.../apache/dubbo/remoting/transport/AbstractPeer.java 60.86% <0%> (-2.18%) 0% <0%> (ø)
.../exchange/support/header/HeaderExchangeServer.java 65.09% <0%> (-1.89%) 0% <0%> (ø)
...he/dubbo/registry/multicast/MulticastRegistry.java 67.87% <0%> (-1.81%) 0% <0%> (ø)
...he/dubbo/remoting/transport/netty/NettyClient.java 65% <0%> (-1.11%) 11% <0%> (ø)
... and 12 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 3702887...a3692f4. Read the comment docs.

@apache apache deleted a comment from CLAassistant Sep 8, 2019
@cvictory cvictory added this to the 2.7.4 milestone Sep 9, 2019
@@ -97,7 +101,14 @@ public ThriftProtocol(Class<?>... exceptions) {
TNonblockingServerSocket.NonblockingAbstractServerSocketArgs args = new TNonblockingServerSocket.NonblockingAbstractServerSocketArgs();
/**1000 connections*/
args.backlog(1000);
args.bindAddr(new InetSocketAddress(url.getHost(), url.getPort()));

String bindIp = url.getParameter(Constants.BIND_IP_KEY,url.getHost());
Copy link
Contributor

Choose a reason for hiding this comment

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

Format the code?

@cvictory cvictory self-assigned this Sep 9, 2019
Copy link
Contributor

@cvictory cvictory left a comment

Choose a reason for hiding this comment

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

LGTM

@cvictory cvictory merged commit 5c1cfb2 into apache:master Sep 11, 2019
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.

native-thrift cannot run within docker instance
3 participants