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

Refactor code about "async invoke" in dubbo plugin (#1498) #1510

Merged
merged 2 commits into from
May 21, 2021
Merged

Refactor code about "async invoke" in dubbo plugin (#1498) #1510

merged 2 commits into from
May 21, 2021

Conversation

ttttangzhen
Copy link
Contributor

@ttttangzhen ttttangzhen commented May 21, 2021

fix #1498

I found that Dubbo always supports asynchronous calls, but blocks to get the return value when using $invoke.
So my solution is:

  1. replace $asyncInvoke with $invoke
  2. add attachment (async = true) to the dubbo thread context

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed mvn clean install -Dmaven.javadoc.skip=true.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
alexdima Alexandru Dima

Verified

This commit was signed with the committer’s verified signature. The key has expired.
alexdima Alexandru Dima
@codecov-commenter
Copy link

Codecov Report

Merging #1510 (0b98287) into master (55ecf11) will decrease coverage by 0.81%.
The diff coverage is 42.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1510      +/-   ##
============================================
- Coverage     64.95%   64.14%   -0.82%     
+ Complexity     2095     2079      -16     
============================================
  Files           419      418       -1     
  Lines          8826     8788      -38     
  Branches        883      881       -2     
============================================
- Hits           5733     5637      -96     
- Misses         2663     2721      +58     
  Partials        430      430              
Impacted Files Coverage Δ Complexity Δ
...gin/apache/dubbo/cache/ApplicationConfigCache.java 74.71% <ø> (+0.84%) 19.00 <0.00> (ø)
...he/dubbo/handler/ApacheDubboPluginDataHandler.java 83.33% <ø> (-1.29%) 4.00 <0.00> (ø)
...ubbo/subscriber/ApacheDubboMetaDataSubscriber.java 58.82% <ø> (-2.29%) 5.00 <0.00> (ø)
...in/apache/dubbo/proxy/ApacheDubboProxyService.java 51.72% <42.85%> (-7.26%) 4.00 <0.00> (-3.00)
...enyu/client/tars/TarsServiceBeanPostProcessor.java 34.66% <0.00%> (-56.00%) 8.00% <0.00%> (-6.00%)
...che/shenyu/sync/data/http/HttpSyncDataService.java 63.10% <0.00%> (-18.45%) 12.00% <0.00%> (ø%)
...in/alibaba/dubbo/cache/ApplicationConfigCache.java 75.86% <0.00%> (-4.60%) 20.00% <0.00%> (ø%)
...henyu/plugin/httpclient/NettyHttpClientPlugin.java 57.14% <0.00%> (-2.05%) 10.00% <0.00%> (ø%)

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 55ecf11...0b98287. Read the comment docs.

@dengliming dengliming merged commit eb9af33 into apache:master May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor code about "async invoke" is not supported in Dubbo lower than 2.7.3
3 participants