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

bugfix init reference dead lock #2053

Merged
merged 5 commits into from
Jul 12, 2018
Merged

bugfix init reference dead lock #2053

merged 5 commits into from
Jul 12, 2018

Conversation

yunxiyi
Copy link
Contributor

@yunxiyi yunxiyi commented Jul 9, 2018

What is the purpose of the change

#2052 dubbo 整合spring boot 的时候死锁,

Brief changelog

dubbo-config/dubbo-config-spring/org/apache/dubbo/config/spring/extension/SpringExtensionFactory

Verifying this change

XXXXX

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-io commented Jul 9, 2018

Codecov Report

Merging #2053 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2053      +/-   ##
============================================
- Coverage     53.05%   53.03%   -0.03%     
+ Complexity     4953     4951       -2     
============================================
  Files           559      559              
  Lines         24892    24894       +2     
  Branches       4431     4432       +1     
============================================
- Hits          13207    13202       -5     
- Misses         9662     9667       +5     
- Partials       2023     2025       +2
Impacted Files Coverage Δ Complexity Δ
...onfig/spring/extension/SpringExtensionFactory.java 85.71% <100%> (+1.09%) 10 <6> (+2) ⬆️
.../dubbo/remoting/transport/netty4/NettyChannel.java 60% <0%> (-6.25%) 21% <0%> (-2%)
...e/dubbo/remoting/transport/netty4/NettyServer.java 72.13% <0%> (-3.28%) 9% <0%> (-1%)
...dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java 77.2% <0%> (-1.48%) 29% <0%> (ø)
...apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java 58.33% <0%> (-0.84%) 30% <0%> (-1%)
...ubbo/rpc/protocol/dubbo/ChannelWrappedInvoker.java 50% <0%> (+4.16%) 3% <0%> (ø) ⬇️
...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java 88.88% <0%> (+5.55%) 7% <0%> (+1%) ⬆️

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 b055991...617c931. Read the comment docs.


//SPI never get from spring bean factory
if (type.isInterface() && type.isAnnotationPresent(SPI.class)) {
ExtensionLoader<T> loader = ExtensionLoader.getExtensionLoader(type);
Copy link
Member

Choose a reason for hiding this comment

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

in this case, we should simply return null since it is SpiExtensionFactory's duty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right, it's not SpringExtensionFactory's duty to find SPI instance.

@yunxiyi
Copy link
Contributor Author

yunxiyi commented Jul 11, 2018

The code has been modified, please review again

@beiwei30 beiwei30 merged commit bea020f into apache:master Jul 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