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/11/15 14:27:31 UTC
[GitHub] [dubbo-go] Mulavar opened a new pull request #1589: refactor listenDirEvent
Mulavar opened a new pull request #1589:
URL: https://github.com/apache/dubbo-go/pull/1589
1. remove CLEAR label;
2. remove register/unregister logic for watch children;
3. reorder the zk dynamic configuration code
4. adapt the gost
<!-- 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**:
**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.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
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] LaurenceLiZhixin commented on a change in pull request #1589: refactor listenDirEvent
Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on a change in pull request #1589:
URL: https://github.com/apache/dubbo-go/pull/1589#discussion_r751923944
##########
File path: registry/zookeeper/registry.go
##########
@@ -150,7 +150,11 @@ func (r *zkRegistry) InitListeners() {
// CreatePath creates the path in the registry center of zookeeper
func (r *zkRegistry) CreatePath(path string) error {
- return r.ZkClient().Create(path)
+ err := r.ZkClient().Create(path)
+ if err != nil && err != zk.ErrNodeExists {
Review comment:
I think != is just ok
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
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] XiaoWeiKIN commented on a change in pull request #1589: [WIP]refactor listenDirEvent
Posted by GitBox <gi...@apache.org>.
XiaoWeiKIN commented on a change in pull request #1589:
URL: https://github.com/apache/dubbo-go/pull/1589#discussion_r750026511
##########
File path: remoting/zookeeper/listener.go
##########
@@ -366,7 +346,7 @@ func (l *ZkEventListener) startScheduleWatchTask(
ticker = time.NewTicker(tickerTTL)
}
case zkEvent := <-childEventCh:
- logger.Warnf("get a zookeeper childEventCh{type:%s, server:%s, path:%s, state:%d-%s, err:%v}",
+ logger.Debugf("get a zookeeper childEventCh{type:%s, server:%s, path:%s, state:%d-%s, err:%v}",
Review comment:
Get 大写
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
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] justxuewei commented on a change in pull request #1589: refactor listenDirEvent
Posted by GitBox <gi...@apache.org>.
justxuewei commented on a change in pull request #1589:
URL: https://github.com/apache/dubbo-go/pull/1589#discussion_r751872634
##########
File path: registry/zookeeper/registry.go
##########
@@ -150,7 +150,11 @@ func (r *zkRegistry) InitListeners() {
// CreatePath creates the path in the registry center of zookeeper
func (r *zkRegistry) CreatePath(path string) error {
- return r.ZkClient().Create(path)
+ err := r.ZkClient().Create(path)
+ if err != nil && err != zk.ErrNodeExists {
Review comment:
IMO, using errors.Is() is better than `!=`.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
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 #1589: [WIP]refactor listenDirEvent
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1589:
URL: https://github.com/apache/dubbo-go/pull/1589#issuecomment-968979747
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1589?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1589](https://codecov.io/gh/apache/dubbo-go/pull/1589?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19c0bb9) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/1fdd429b8c4a02c477ceca510cce779f782fe512?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1fdd429) will **increase** coverage by `0.14%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/dubbo-go/pull/1589?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 3.0 #1589 +/- ##
==========================================
+ Coverage 41.15% 41.29% +0.14%
==========================================
Files 250 250
Lines 14277 14262 -15
==========================================
+ Hits 5875 5890 +15
+ Misses 7719 7689 -30
Partials 683 683
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1589?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/1589/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `1.23% <0.00%> (-0.03%)` | :arrow_down: |
| [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/1589/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `0.00% <0.00%> (ø)` | |
| [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/1589/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `82.50% <0.00%> (+2.50%)` | :arrow_up: |
| [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/1589/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `34.43% <0.00%> (+7.94%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1589?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1589?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1fdd429...19c0bb9](https://codecov.io/gh/apache/dubbo-go/pull/1589?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
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] justxuewei merged pull request #1589: refactor listenDirEvent
Posted by GitBox <gi...@apache.org>.
justxuewei merged pull request #1589:
URL: https://github.com/apache/dubbo-go/pull/1589
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
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] justxuewei commented on a change in pull request #1589: refactor listenDirEvent
Posted by GitBox <gi...@apache.org>.
justxuewei commented on a change in pull request #1589:
URL: https://github.com/apache/dubbo-go/pull/1589#discussion_r751873188
##########
File path: config_center/zookeeper/impl.go
##########
@@ -80,15 +81,20 @@ func newZookeeperDynamicConfiguration(url *common.URL) (*zookeeperDynamicConfigu
logger.Errorf("zookeeper client start error ,error message is %v", err)
return nil, err
}
+ err = c.client.Create(c.rootPath)
+ if err != nil && err != zk.ErrNodeExists {
Review comment:
errors.Is
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
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