You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "beiwei30 (GitHub)" <gi...@apache.org> on 2018/11/01 09:42:09 UTC
[GitHub] [incubator-dubbo] beiwei30 opened pull request #2725:
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
## What is the purpose of the change
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
## Brief changelog
dubbo-all/pom.xml
dubbo-bom/pom.xml
dubbo-bootstrap/pom.xml
dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java
dubbo-config/dubbo-config-spring/pom.xml
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/extension/SpringExtensionFactory.java
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializer.java
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListener.java
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboContextListener.java
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/BeanFactoryUtils.java
dubbo-config/dubbo-config-spring/src/main/resources/META-INF/web-fragment.xml
dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializerTest.java
dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListenerTest.java
dubbo-container/dubbo-container-spring/pom.xml
dubbo-container/dubbo-container-spring/src/main/java/org/apache/dubbo/container/spring/SpringContainer.java
dubbo-distribution/pom.xml
pom.xml
## Verifying this change
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) 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](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] 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](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2725 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] codecov-io commented on issue #2725:
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=h1) Report
> Merging [#2725](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/c21cc05ec9ff4f96f34af9027714bb525cd0edf5?src=pr&el=desc) will **decrease** coverage by `0.06%`.
> The diff coverage is `68.18%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #2725 +/- ##
==========================================
- Coverage 63.6% 63.53% -0.07%
==========================================
Files 580 576 -4
Lines 25978 25918 -60
Branches 4541 4538 -3
==========================================
- Hits 16523 16467 -56
+ Misses 7292 7291 -1
+ Partials 2163 2160 -3
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...n/java/org/apache/dubbo/config/ProtocolConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9Qcm90b2NvbENvbmZpZy5qYXZh) | `75.18% <ø> (+1.11%)` | :arrow_up: |
| [...va/org/apache/dubbo/config/spring/ServiceBean.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvU2VydmljZUJlYW4uamF2YQ==) | `49.57% <100%> (+1.91%)` | :arrow_up: |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvZXh0ZW5zaW9uL1NwcmluZ0V4dGVuc2lvbkZhY3RvcnkuamF2YQ==) | `80.55% <100%> (-5.66%)` | :arrow_down: |
| [...apache/dubbo/container/spring/SpringContainer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29udGFpbmVyL2R1YmJvLWNvbnRhaW5lci1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbnRhaW5lci9zcHJpbmcvU3ByaW5nQ29udGFpbmVyLmphdmE=) | `70.58% <100%> (-4.42%)` | :arrow_down: |
| [...che/dubbo/config/spring/util/BeanFactoryUtils.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvdXRpbC9CZWFuRmFjdG9yeVV0aWxzLmphdmE=) | `66.66% <41.66%> (-25%)` | :arrow_down: |
| [...ache/dubbo/remoting/transport/AbstractChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RDaGFubmVsLmphdmE=) | `75% <0%> (-12.5%)` | :arrow_down: |
| [...ubbo/rpc/protocol/dubbo/ChannelWrappedInvoker.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL0NoYW5uZWxXcmFwcGVkSW52b2tlci5qYXZh) | `41.66% <0%> (-8.34%)` | :arrow_down: |
| [.../apache/dubbo/qos/protocol/QosProtocolWrapper.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3Byb3RvY29sL1Fvc1Byb3RvY29sV3JhcHBlci5qYXZh) | `65.78% <0%> (-5.27%)` | :arrow_down: |
| [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `67.85% <0%> (-3.58%)` | :arrow_down: |
| ... and [4 more](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=footer). Last update [c21cc05...595b04d](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2725 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj commented on issue #2725:
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
https://github.com/apache/incubator-dubbo/pull/1763
https://github.com/apache/incubator-dubbo/pull/1820
https://github.com/apache/incubator-dubbo/pull/2126
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2725 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj closed pull request #2725:
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
[ pull request closed by chickenlj ]
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2725 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] codecov-io commented on issue #2725:
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=h1) Report
> Merging [#2725](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/3cf801bb9d45524ae1e4692e04aeda2bcb5050dd?src=pr&el=desc) will **increase** coverage by `1.2%`.
> The diff coverage is `68.18%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #2725 +/- ##
=========================================
+ Coverage 62.35% 63.56% +1.2%
=========================================
Files 602 576 -26
Lines 27978 25923 -2055
Branches 4831 4540 -291
=========================================
- Hits 17446 16477 -969
+ Misses 8259 7285 -974
+ Partials 2273 2161 -112
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...n/java/org/apache/dubbo/config/ProtocolConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9Qcm90b2NvbENvbmZpZy5qYXZh) | `75.18% <ø> (+1.11%)` | :arrow_up: |
| [...va/org/apache/dubbo/config/spring/ServiceBean.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvU2VydmljZUJlYW4uamF2YQ==) | `49.57% <100%> (+1.91%)` | :arrow_up: |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvZXh0ZW5zaW9uL1NwcmluZ0V4dGVuc2lvbkZhY3RvcnkuamF2YQ==) | `84.61% <100%> (+3.36%)` | :arrow_up: |
| [...apache/dubbo/container/spring/SpringContainer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29udGFpbmVyL2R1YmJvLWNvbnRhaW5lci1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbnRhaW5lci9zcHJpbmcvU3ByaW5nQ29udGFpbmVyLmphdmE=) | `70.58% <100%> (-4.42%)` | :arrow_down: |
| [...che/dubbo/config/spring/util/BeanFactoryUtils.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvdXRpbC9CZWFuRmFjdG9yeVV0aWxzLmphdmE=) | `66.66% <41.66%> (-25%)` | :arrow_down: |
| [...ache/dubbo/remoting/p2p/support/AbstractGroup.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctcDJwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9wMnAvc3VwcG9ydC9BYnN0cmFjdEdyb3VwLmphdmE=) | `45.45% <0%> (-11.37%)` | :arrow_down: |
| [...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9maWx0ZXIvQWN0aXZlTGltaXRGaWx0ZXIuamF2YQ==) | `83.33% <0%> (-5.56%)` | :arrow_down: |
| [...ng/exchange/support/header/HeartbeatTimerTask.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L2hlYWRlci9IZWFydGJlYXRUaW1lclRhc2suamF2YQ==) | `73.68% <0%> (-5.27%)` | :arrow_down: |
| [.../dubbo/remoting/transport/netty4/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2hhbm5lbC5qYXZh) | `61.17% <0%> (-4.71%)` | :arrow_down: |
| [...ache/dubbo/remoting/transport/mina/MinaClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L21pbmEvTWluYUNsaWVudC5qYXZh) | `56.92% <0%> (-1.54%)` | :arrow_down: |
| ... and [33 more](https://codecov.io/gh/apache/incubator-dubbo/pull/2725/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=footer). Last update [3cf801b...f023841](https://codecov.io/gh/apache/incubator-dubbo/pull/2725?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2725 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] cvictory commented on issue #2725:
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
Posted by "cvictory (GitHub)" <gi...@apache.org>.
Why do you remove ' context.registerShutdownHook()'?
I think it may be cause some issues in non-web application because no
ContextClosedEvent
that it is generated by stop() method will be published .
Maybe we need to write a demo to verify this doubt.
Refer to :
https://www.concretepage.com/spring/registershutdownhook_spring
https://netjs.blogspot.com/2018/03/registershutdownhook-method-in-spring.html
ken.lj <no...@github.com> 于2018年11月5日周一 上午10:49写道:
> Merged #2725 <https://github.com/apache/incubator-dubbo/pull/2725> into
> master.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/incubator-dubbo/pull/2725#event-1945207258>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AD5mbL-JNUjr5RwKAzPKP3HEFtf-8Tx3ks5ur6dTgaJpZM4YGFHj>
> .
>
--
Best Regard!
cvitory
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2725 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj commented on issue #2725:
[DUBBO-2525]: Problems of graceful shutdown in 2.6.3 and some recommendation
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
+1 to merge this PR.
The changes about gracefully shutdown looks good, and it's much easier to use and understand than before.
For the bootstrap part, I think the initial author has some other consideration and designs that are still not realize yet, e.g., a unified bootstrap entry for API usage, a fluent builder pattern, .... but I think it's ok to remove this module at this moment since it's nearly empty after refactoring the shutdown part.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/2725 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org