dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

fix issue: resolve the conficts between Dubbo shutdown hook and Spring.

Open pandaapo opened this issue 3 years ago • 5 comments

What is the purpose of the change

Fixes #10709

Brief changelog

Mark Dubbo Module if is spring managed. Wait the module bound to Spring to be handled by Spring before Dubbo shutdown hook executing.

Verifying this change

Checklist

  • [x] 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.
  • [ ] 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.
  • [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • [ ] 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.
  • [ ] Add some description to dubbo-website project if you are requesting to add a feature.
  • [ ] GitHub Actions works fine on your own branch.
  • [ ] If this contribution is large, please follow the Software Donation Guide.

pandaapo avatar Oct 11 '22 02:10 pandaapo

image Please fix uts

AlbumenJ avatar Oct 13 '22 02:10 AlbumenJ

image Please fix uts

I will fix these checkstyle errors. By the way, does "uts" actually mean "unit tests"?

pandaapo avatar Oct 13 '22 03:10 pandaapo

image Please fix uts

Now I import the codestyle scheme dubbo_codestyle_for_idea.xml into idea following the steps. But I find it seems not to work. When I open a java file with style errors in idea, there is no any tips. Could you tell me how to do correctly?

pandaapo avatar Oct 13 '22 05:10 pandaapo

Codecov Report

Merging #10730 (90da6af) into 3.1 (199b059) will decrease coverage by 0.03%. The diff coverage is 12.50%.

@@             Coverage Diff              @@
##                3.1   #10730      +/-   ##
============================================
- Coverage     65.23%   65.19%   -0.04%     
- Complexity      469      493      +24     
============================================
  Files          1336     1336              
  Lines         56932    56961      +29     
  Branches       8437     8431       -6     
============================================
- Hits          37140    37138       -2     
- Misses        15821    15871      +50     
+ Partials       3971     3952      -19     
Impacted Files Coverage Δ
...ava/org/apache/dubbo/config/DubboShutdownHook.java 22.58% <0.00%> (-16.31%) :arrow_down:
...n/java/org/apache/dubbo/rpc/model/ModuleModel.java 92.85% <75.00%> (-0.90%) :arrow_down:
.../config/spring/context/DubboSpringInitializer.java 85.54% <100.00%> (+0.17%) :arrow_up:
.../apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java 63.51% <0.00%> (-3.63%) :arrow_down:
...mmon/threadpool/support/AbortPolicyWithReport.java 81.81% <0.00%> (-2.40%) :arrow_down:
...g/apache/dubbo/rpc/protocol/tri/TripleInvoker.java 60.41% <0.00%> (-1.73%) :arrow_down:
.../apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java 61.36% <0.00%> (-1.63%) :arrow_down:
...n/java/org/apache/dubbo/config/ProtocolConfig.java 84.67% <0.00%> (-1.15%) :arrow_down:
...ory/annotation/ServiceAnnotationPostProcessor.java 83.49% <0.00%> (-1.09%) :arrow_down:
...pache/dubbo/registry/support/AbstractRegistry.java 67.10% <0.00%> (-0.99%) :arrow_down:
... and 11 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Oct 13 '22 05:10 codecov-commenter

LGTM. Could you please add some unit test cases for this PR?

AlbumenJ avatar Oct 14 '22 02:10 AlbumenJ