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

support method and positive timeout for sync #4436

Merged
merged 1 commit into from
Jul 2, 2019
Merged

support method and positive timeout for sync #4436

merged 1 commit into from
Jul 2, 2019

Conversation

haiyang1985
Copy link
Member

Fix #4435

What is the purpose of the change

  1. Assume that service have sayHello and sayHi method. The sync timeout for sayHello is 1000, but not 800. We have to get method timeout for AsyncToSyncInvoke call.
<dubbo:reference id="demoService" interface="com.ctrip.Demo" timeout="1000">
  <dubbo:method name="sayHello">
    <dubbo:parameter key="timeout" value="800"/>
  </dubbo:method>
</dubbo:reference>
  1. For the CompletableFuture, it will throw TimeoutException for negative timeout value.

Brief changelog

XXXXX

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.

@codecov-io
Copy link

Codecov Report

Merging #4436 into 2.7.3-release will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##             2.7.3-release    #4436      +/-   ##
===================================================
+ Coverage            62.78%   62.78%   +<.01%     
- Complexity             452      453       +1     
===================================================
  Files                  769      769              
  Lines                33012    33012              
  Branches              5208     5208              
===================================================
+ Hits                 20726    20727       +1     
  Misses                9892     9892              
+ Partials              2394     2393       -1
Impacted Files Coverage Δ Complexity Δ
.../apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java 77.35% <100%> (ø) 0 <0> (ø) ⬇️
.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java 87.5% <100%> (ø) 0 <0> (ø) ⬇️
...ache/dubbo/remoting/p2p/support/AbstractGroup.java 45.45% <0%> (-11.37%) 0% <0%> (ø)
.../remoting/transport/netty4/NettyServerHandler.java 61.9% <0%> (-9.53%) 0% <0%> (ø)
...ng/transport/dispatcher/all/AllChannelHandler.java 51.42% <0%> (-5.72%) 0% <0%> (ø)
...mon/src/main/java/org/apache/dubbo/common/URL.java 49.55% <0%> (+0.14%) 0% <0%> (ø) ⬇️
...ache/dubbo/registry/multiple/MultipleRegistry.java 63.38% <0%> (+0.7%) 21% <0%> (+1%) ⬆️
...pache/dubbo/registry/support/AbstractRegistry.java 81.6% <0%> (+1.53%) 0% <0%> (ø) ⬇️
...exchange/support/header/HeaderExchangeHandler.java 66.39% <0%> (+1.63%) 0% <0%> (ø) ⬇️
.../apache/dubbo/remoting/transport/AbstractPeer.java 67.39% <0%> (+8.69%) 0% <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 d66a2fa...0bd5dc6. Read the comment docs.

@manzhizhen manzhizhen self-requested a review July 1, 2019 14:52
@chickenlj chickenlj merged commit cfba520 into apache:2.7.3-release Jul 2, 2019
@haiyang1985 haiyang1985 deleted the sync_timeout branch September 12, 2019 08:13
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