You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "flycash (GitHub)" <gi...@apache.org> on 2019/11/15 09:31:31 UTC

[GitHub] [dubbo-go] flycash opened pull request #255: Ftr: Gracefully shutdown

<!--  Thanks for sending a pull request! 
-->

**What this PR does**:
Gracefully shutdown. The steps are:
1. Destroy all registries;
2. wait for the new request for a short time
3. provider rejects new request and then wait for processing all requests;
4. consumer rejects sending new request and then wait for response
5. invoke custome shutdown callback
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #239 

**Special notes for your reviewer**:

Please check the order of releasing resources.

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
Now the application can shutdown gracefully
```

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
add a blank line bf this line.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
you params num in this log is 2. However, the placeholder number is 2.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] hxmhlt closed pull request #255: Ftr: Gracefully shutdown

Posted by "hxmhlt (GitHub)" <gi...@apache.org>.
[ pull request closed by hxmhlt ]

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] pantianying commented on issue #255: Ftr: Gracefully shutdown

Posted by "pantianying (GitHub)" <gi...@apache.org>.
LGTM

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io commented on issue #255: Ftr: Gracefully shutdown

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=h1) Report
> Merging [#255](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/d82e97f30baf964ba3647ebeaf36884b004cf811?src=pr&el=desc) will **decrease** coverage by `0.77%`.
> The diff coverage is `70.21%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/255/graphs/tree.svg?width=650&token=dcPE6RyFAL&height=150&src=pr)](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##           develop     #255      +/-   ##
===========================================
- Coverage    66.23%   65.45%   -0.78%     
===========================================
  Files          108      111       +3     
  Lines         6903     7043     +140     
===========================================
+ Hits          4572     4610      +38     
- Misses        1880     1978      +98     
- Partials       451      455       +4
```


| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [remoting/etcdv3/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2ZhY2FkZS5nbw==) | `0% <ø> (ø)` | :arrow_up: |
| [remoting/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2xpc3RlbmVyLmdv) | `46.08% <ø> (ø)` | :arrow_up: |
| [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `76.74% <ø> (ø)` | :arrow_up: |
| [remoting/etcdv3/client.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2NsaWVudC5nbw==) | `57.8% <ø> (ø)` | :arrow_up: |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `59.25% <ø> (ø)` | :arrow_up: |
| [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `51.51% <ø> (ø)` | :arrow_up: |
| [config/provider\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-Y29uZmlnL3Byb3ZpZGVyX2NvbmZpZy5nbw==) | `58.53% <ø> (ø)` | :arrow_up: |
| [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80% <ø> (ø)` | :arrow_up: |
| [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `61.78% <ø> (ø)` | :arrow_up: |
| [registry/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `61.7% <0%> (ø)` | :arrow_up: |
| ... and [14 more](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/255?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/dubbo-go/pull/255?src=pr&el=footer). Last update [d82e97f...a17a95a](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
If the init value is 0, you need not to set it.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io commented on issue #255: Ftr: Gracefully shutdown

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=h1) Report
> Merging [#255](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/d82e97f30baf964ba3647ebeaf36884b004cf811?src=pr&el=desc) will **decrease** coverage by `0.77%`.
> The diff coverage is `70.21%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/255/graphs/tree.svg?width=650&token=dcPE6RyFAL&height=150&src=pr)](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##           develop     #255      +/-   ##
===========================================
- Coverage    66.23%   65.45%   -0.78%     
===========================================
  Files          108      111       +3     
  Lines         6903     7043     +140     
===========================================
+ Hits          4572     4610      +38     
- Misses        1880     1978      +98     
- Partials       451      455       +4
```


| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [remoting/etcdv3/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2ZhY2FkZS5nbw==) | `0% <ø> (ø)` | :arrow_up: |
| [remoting/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2xpc3RlbmVyLmdv) | `46.08% <ø> (ø)` | :arrow_up: |
| [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `76.74% <ø> (ø)` | :arrow_up: |
| [remoting/etcdv3/client.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2NsaWVudC5nbw==) | `57.8% <ø> (ø)` | :arrow_up: |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `59.25% <ø> (ø)` | :arrow_up: |
| [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `51.51% <ø> (ø)` | :arrow_up: |
| [config/provider\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-Y29uZmlnL3Byb3ZpZGVyX2NvbmZpZy5nbw==) | `58.53% <ø> (ø)` | :arrow_up: |
| [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80% <ø> (ø)` | :arrow_up: |
| [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `61.78% <ø> (ø)` | :arrow_up: |
| [registry/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `61.7% <0%> (ø)` | :arrow_up: |
| ... and [14 more](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/255?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/dubbo-go/pull/255?src=pr&el=footer). Last update [d82e97f...14dec2f](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
in Go, the default value is 0. so, delete "= 0" pls.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
add a blank bf this line.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
pls set a default len for this map. maybe 16 is valid.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
add a blank line before this import.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] codecov-io commented on issue #255: Ftr: Gracefully shutdown

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=h1) Report
> Merging [#255](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/d82e97f30baf964ba3647ebeaf36884b004cf811?src=pr&el=desc) will **decrease** coverage by `0.75%`.
> The diff coverage is `70.42%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/255/graphs/tree.svg?width=650&token=dcPE6RyFAL&height=150&src=pr)](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##           develop     #255      +/-   ##
===========================================
- Coverage    66.23%   65.47%   -0.76%     
===========================================
  Files          108      111       +3     
  Lines         6903     7044     +141     
===========================================
+ Hits          4572     4612      +40     
- Misses        1880     1975      +95     
- Partials       451      457       +6
```


| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [remoting/etcdv3/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2ZhY2FkZS5nbw==) | `0% <ø> (ø)` | :arrow_up: |
| [remoting/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2xpc3RlbmVyLmdv) | `46.08% <ø> (ø)` | :arrow_up: |
| [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `76.74% <ø> (ø)` | :arrow_up: |
| [remoting/etcdv3/client.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVtb3RpbmcvZXRjZHYzL2NsaWVudC5nbw==) | `57.8% <ø> (ø)` | :arrow_up: |
| [config/consumer\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-Y29uZmlnL2NvbnN1bWVyX2NvbmZpZy5nbw==) | `59.25% <ø> (ø)` | :arrow_up: |
| [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `51.51% <ø> (ø)` | :arrow_up: |
| [config/provider\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-Y29uZmlnL3Byb3ZpZGVyX2NvbmZpZy5nbw==) | `58.53% <ø> (ø)` | :arrow_up: |
| [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80% <ø> (ø)` | :arrow_up: |
| [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `61.78% <ø> (ø)` | :arrow_up: |
| [registry/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `61.7% <0%> (ø)` | :arrow_up: |
| ... and [17 more](https://codecov.io/gh/apache/dubbo-go/pull/255/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/255?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/dubbo-go/pull/255?src=pr&el=footer). Last update [d82e97f...a17a95a](https://codecov.io/gh/apache/dubbo-go/pull/255?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [dubbo-go] AlexStocks commented on pull request #255: Ftr: Gracefully shutdown

Posted by "AlexStocks (GitHub)" <gi...@apache.org>.
sig.String() -> sig.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] flycash commented on issue #255: Ftr: Gracefully shutdown

Posted by "flycash (GitHub)" <gi...@apache.org>.
It seems that the syscall.SIGEMT cannot be found in CI.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-go] flycash commented on pull request #255: Ftr: Gracefully shutdown

Posted by "flycash (GitHub)" <gi...@apache.org>.
Sorry, it's for tests, I forgot to remove it.

[ Full content available at: https://github.com/apache/dubbo-go/pull/255 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org