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 2021/01/14 02:32:51 UTC
[GitHub] [dubbo-go] mark4z opened a new pull request #989: Enable Nacos registry local cache
mark4z opened a new pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989
<!-- Thanks for sending a pull request!
Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request.
-->
**What this PR does**:
Enable Nacos registry local cache
**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 #931
**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] mark4z commented on a change in pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
mark4z commented on a change in pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#discussion_r557856746
##########
File path: registry/nacos/registry_test.go
##########
@@ -72,14 +77,19 @@ func TestNacosRegistry_Subscribe(t *testing.T) {
if !checkNacosServerAlive() {
return
}
- regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)))
+ regurlMap := url.Values{}
+ regurlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
+ regurlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
+ regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParams(regurlMap))
+
urlMap := url.Values{}
urlMap.Set(constant.GROUP_KEY, "guangzhou-idc")
urlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
urlMap.Set(constant.INTERFACE_KEY, "com.ikurento.user.UserProvider")
urlMap.Set(constant.VERSION_KEY, "1.0.0")
urlMap.Set(constant.CLUSTER_KEY, "mock")
urlMap.Set(constant.NACOS_PATH_KEY, "")
+ urlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
Review comment:
Has been removed
----------------------------------------------------------------
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-io commented on pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#issuecomment-760274785
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=h1) Report
> Merging [#989](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=desc) (c26d24d) into [master](https://codecov.io/gh/apache/dubbo-go/commit/92389d268ca7a8942b2be5f9a147d92cdf1b1203?el=desc) (92389d2) will **increase** coverage by `0.03%`.
> The diff coverage is `40.00%`.
[](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #989 +/- ##
==========================================
+ Coverage 59.66% 59.69% +0.03%
==========================================
Files 261 261
Lines 12903 12907 +4
==========================================
+ Hits 7698 7705 +7
+ Misses 4238 4233 -5
- Partials 967 969 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `50.36% <40.00%> (-0.77%)` | :arrow_down: |
| [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-2.41%)` | :arrow_down: |
| [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `60.00% <0.00%> (+8.88%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/989?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/989?src=pr&el=footer). Last update [92389d2...c26d24d](https://codecov.io/gh/apache/dubbo-go/pull/989?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] mark4z commented on a change in pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
mark4z commented on a change in pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#discussion_r557846327
##########
File path: registry/nacos/registry_test.go
##########
@@ -72,14 +77,19 @@ func TestNacosRegistry_Subscribe(t *testing.T) {
if !checkNacosServerAlive() {
return
}
- regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)))
+ regurlMap := url.Values{}
+ regurlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
+ regurlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
+ regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParams(regurlMap))
+
urlMap := url.Values{}
urlMap.Set(constant.GROUP_KEY, "guangzhou-idc")
urlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
urlMap.Set(constant.INTERFACE_KEY, "com.ikurento.user.UserProvider")
urlMap.Set(constant.VERSION_KEY, "1.0.0")
urlMap.Set(constant.CLUSTER_KEY, "mock")
urlMap.Set(constant.NACOS_PATH_KEY, "")
+ urlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
Review comment:
It's necessary in this IT.
Nacos启动时会读本地缓存,所以IT的数据会写到缓存文件,并影响下个IT.
----------------------------------------------------------------
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] luckyxiaoqiang commented on a change in pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#discussion_r557848918
##########
File path: registry/nacos/registry_test.go
##########
@@ -72,14 +77,19 @@ func TestNacosRegistry_Subscribe(t *testing.T) {
if !checkNacosServerAlive() {
return
}
- regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)))
+ regurlMap := url.Values{}
+ regurlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
+ regurlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
+ regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParams(regurlMap))
+
urlMap := url.Values{}
urlMap.Set(constant.GROUP_KEY, "guangzhou-idc")
urlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
urlMap.Set(constant.INTERFACE_KEY, "com.ikurento.user.UserProvider")
urlMap.Set(constant.VERSION_KEY, "1.0.0")
urlMap.Set(constant.CLUSTER_KEY, "mock")
urlMap.Set(constant.NACOS_PATH_KEY, "")
+ urlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
Review comment:
Registry ULR需要这个参数是理解的,实例URL也需要吗?
----------------------------------------------------------------
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] mark4z closed pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
mark4z closed pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989
----------------------------------------------------------------
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] mark4z commented on pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
mark4z commented on pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#issuecomment-760217638
Local cache causes unit tests to affect each other, so I turned it off when testing
----------------------------------------------------------------
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] AlexStocks merged pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989
----------------------------------------------------------------
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] luckyxiaoqiang commented on a change in pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
luckyxiaoqiang commented on a change in pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#discussion_r557814738
##########
File path: registry/nacos/registry_test.go
##########
@@ -72,14 +77,19 @@ func TestNacosRegistry_Subscribe(t *testing.T) {
if !checkNacosServerAlive() {
return
}
- regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParamsValue(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER)))
+ regurlMap := url.Values{}
+ regurlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
+ regurlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
+ regurl, _ := common.NewURL("registry://console.nacos.io:80", common.WithParams(regurlMap))
+
urlMap := url.Values{}
urlMap.Set(constant.GROUP_KEY, "guangzhou-idc")
urlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.PROVIDER))
urlMap.Set(constant.INTERFACE_KEY, "com.ikurento.user.UserProvider")
urlMap.Set(constant.VERSION_KEY, "1.0.0")
urlMap.Set(constant.CLUSTER_KEY, "mock")
urlMap.Set(constant.NACOS_PATH_KEY, "")
+ urlMap.Set(constant.NACOS_NOT_LOAD_LOCAL_CACHE, "true")
Review comment:
Is this necessary?
----------------------------------------------------------------
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-io edited a comment on pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#issuecomment-760274785
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=h1) Report
> Merging [#989](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=desc) (17825e9) into [master](https://codecov.io/gh/apache/dubbo-go/commit/92389d268ca7a8942b2be5f9a147d92cdf1b1203?el=desc) (92389d2) will **decrease** coverage by `0.02%`.
> The diff coverage is `40.00%`.
[](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #989 +/- ##
==========================================
- Coverage 59.66% 59.63% -0.03%
==========================================
Files 261 261
Lines 12903 12907 +4
==========================================
- Hits 7698 7697 -1
- Misses 4238 4242 +4
- Partials 967 968 +1
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `50.36% <40.00%> (-0.77%)` | :arrow_down: |
| [cluster/cluster\_impl/base\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYmFzZV9jbHVzdGVyX2ludm9rZXIuZ28=) | `52.77% <0.00%> (-8.34%)` | :arrow_down: |
| [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `43.90% <0.00%> (-4.88%)` | :arrow_down: |
| [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-2.41%)` | :arrow_down: |
| [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `60.00% <0.00%> (+8.88%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/989?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/989?src=pr&el=footer). Last update [92389d2...17825e9](https://codecov.io/gh/apache/dubbo-go/pull/989?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] codecov-io edited a comment on pull request #989: Enable Nacos registry local cache
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #989:
URL: https://github.com/apache/dubbo-go/pull/989#issuecomment-760274785
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=h1) Report
> Merging [#989](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=desc) (c26d24d) into [master](https://codecov.io/gh/apache/dubbo-go/commit/92389d268ca7a8942b2be5f9a147d92cdf1b1203?el=desc) (92389d2) will **increase** coverage by `0.03%`.
> The diff coverage is `40.00%`.
[](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #989 +/- ##
==========================================
+ Coverage 59.66% 59.69% +0.03%
==========================================
Files 261 261
Lines 12903 12907 +4
==========================================
+ Hits 7698 7705 +7
+ Misses 4238 4233 -5
- Partials 967 969 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/989?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `50.36% <40.00%> (-0.77%)` | :arrow_down: |
| [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `73.49% <0.00%> (-2.41%)` | :arrow_down: |
| [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/989/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `60.00% <0.00%> (+8.88%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/989?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/989?src=pr&el=footer). Last update [92389d2...17825e9](https://codecov.io/gh/apache/dubbo-go/pull/989?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