You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/05/21 15:49:19 UTC
[GitHub] [dubbo-go] zouyx opened a new pull request #535: Rft : Change subscribe service key in registrydatalistener
zouyx opened a new pull request #535:
URL: https://github.com/apache/dubbo-go/pull/535
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
* Change subscribe service key in registrydatalistener
subscribe service key cannot use pointer, maybe different pointers between subscribe and unsubscribe
**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 #
**Special notes for your reviewer**:
**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
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] codecov-commenter commented on pull request #535: Rft : Change subscribe service key in registrydatalistener
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #535:
URL: https://github.com/apache/dubbo-go/pull/535#issuecomment-632188560
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=h1) Report
> Merging [#535](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/7e7db7bd628f334262f1edf24d2c5fe72217e4f9&el=desc) will **decrease** coverage by `0.12%`.
> The diff coverage is `40.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/535/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## feature/dubbo-2.7.5 #535 +/- ##
=======================================================
- Coverage 66.76% 66.64% -0.13%
=======================================================
Files 199 199
Lines 10272 10276 +4
=======================================================
- Hits 6858 6848 -10
- Misses 2755 2769 +14
Partials 659 659
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `55.70% <10.00%> (-1.54%)` | :arrow_down: |
| [registry/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `64.38% <100.00%> (ø)` | |
| [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `76.71% <0.00%> (-4.57%)` | :arrow_down: |
| [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `56.07% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/535?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/535?src=pr&el=footer). Last update [7e7db7b...5c767f4](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] cch123 commented on pull request #535: Rft : Change subscribe service key in registrydatalistener
Posted by GitBox <gi...@apache.org>.
cch123 commented on pull request #535:
URL: https://github.com/apache/dubbo-go/pull/535#issuecomment-632443329
LGTM
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] zouyx merged pull request #535: Rft : Change subscribe service key in registrydatalistener
Posted by GitBox <gi...@apache.org>.
zouyx merged pull request #535:
URL: https://github.com/apache/dubbo-go/pull/535
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #535: Rft : Change subscribe service key in registrydatalistener
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #535:
URL: https://github.com/apache/dubbo-go/pull/535#issuecomment-632188560
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=h1) Report
> Merging [#535](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/7e7db7bd628f334262f1edf24d2c5fe72217e4f9&el=desc) will **increase** coverage by `0.10%`.
> The diff coverage is `61.53%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/535/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## feature/dubbo-2.7.5 #535 +/- ##
=======================================================
+ Coverage 66.76% 66.86% +0.10%
=======================================================
Files 199 199
Lines 10272 10282 +10
=======================================================
+ Hits 6858 6875 +17
+ Misses 2755 2750 -5
+ Partials 659 657 -2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `55.70% <16.66%> (-1.54%)` | :arrow_down: |
| [registry/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `67.08% <100.00%> (+2.70%)` | :arrow_up: |
| [remoting/kubernetes/watch.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy93YXRjaC5nbw==) | `78.30% <0.00%> (-0.95%)` | :arrow_down: |
| [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `56.07% <0.00%> (ø)` | |
| [protocol/dubbo/client.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY2xpZW50Lmdv) | `69.09% <0.00%> (+1.21%)` | :arrow_up: |
| [protocol/dubbo/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vbGlzdGVuZXIuZ28=) | `62.90% <0.00%> (+5.37%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/535?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/535?src=pr&el=footer). Last update [7e7db7b...c21d928](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] zouyx commented on a change in pull request #535: Rft : Change subscribe service key in registrydatalistener
Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #535:
URL: https://github.com/apache/dubbo-go/pull/535#discussion_r429304205
##########
File path: registry/zookeeper/registry.go
##########
@@ -129,12 +129,17 @@ func (r *zkRegistry) InitListeners() {
recoverd := r.dataListener.subscribed
if recoverd != nil && len(recoverd) > 0 {
// recover all subscribed url
- for conf, oldListener := range recoverd {
+ for recoveredURL, oldListener := range recoverd {
if regConfigListener, ok := oldListener.(*RegistryConfigurationListener); ok {
regConfigListener.Close()
}
- newDataListener.SubscribeURL(conf, NewRegistryConfigurationListener(r.client, r))
- go r.listener.ListenServiceEvent(conf, fmt.Sprintf("/dubbo/%s/"+constant.DEFAULT_CATEGORY, url.QueryEscape(conf.Service())), newDataListener)
+ serviceURL, err := common.NewURL(recoveredURL)
Review comment:
There will use key of subscribed map to recover , so i think it can not change to service key.
@hxmhlt what do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #535: Rft : Change subscribe service key in registrydatalistener
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #535:
URL: https://github.com/apache/dubbo-go/pull/535#issuecomment-632188560
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=h1) Report
> Merging [#535](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=desc) into [feature/dubbo-2.7.5](https://codecov.io/gh/apache/dubbo-go/commit/7e7db7bd628f334262f1edf24d2c5fe72217e4f9&el=desc) will **decrease** coverage by `0.12%`.
> The diff coverage is `40.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/535/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## feature/dubbo-2.7.5 #535 +/- ##
=======================================================
- Coverage 66.76% 66.64% -0.13%
=======================================================
Files 199 199
Lines 10272 10276 +4
=======================================================
- Hits 6858 6848 -10
- Misses 2755 2769 +14
Partials 659 659
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `55.70% <10.00%> (-1.54%)` | :arrow_down: |
| [registry/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `64.38% <100.00%> (ø)` | |
| [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `76.71% <0.00%> (-4.57%)` | :arrow_down: |
| [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/535/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `56.07% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/535?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/535?src=pr&el=footer). Last update [7e7db7b...c21d928](https://codecov.io/gh/apache/dubbo-go/pull/535?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org