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/08/05 03:00:39 UTC
[GitHub] [dubbo-go] wenxuwan opened a new pull request #692: Fix: zk lost event
wenxuwan opened a new pull request #692:
URL: https://github.com/apache/dubbo-go/pull/692
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
try to fix #660
----------------------------------------------------------------
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 #692: Fix: zk lost event
Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #692:
URL: https://github.com/apache/dubbo-go/pull/692#discussion_r465795303
##########
File path: remoting/zookeeper/listener.go
##########
@@ -37,6 +37,10 @@ import (
"github.com/apache/dubbo-go/remoting"
)
+var (
+ DefaultTTL = 15 * time.Minute
Review comment:
```suggestion
defaultTTL = 15 * time.Minute
```
I think this is a private variable?
----------------------------------------------------------------
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 commented on a change in pull request #692: Fix: zk lost event
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #692:
URL: https://github.com/apache/dubbo-go/pull/692#discussion_r465477768
##########
File path: remoting/zookeeper/listener.go
##########
@@ -197,10 +201,20 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
var (
failTimes int
+ ttl time.Duration
event chan struct{}
zkEvent zk.Event
)
event = make(chan struct{}, 4)
+ ttl = DefaultTTL
+ if conf != nil {
+ timeout, err := time.ParseDuration(conf.GetParam(constant.REGISTRY_TTL_KEY, constant.DEFAULT_REG_TTL))
+ if err == nil {
+ ttl = timeout
+ } else {
+ logger.Warnf("wrong configuration for registry ttl, error:=%+v", err)
Review comment:
"wrong configuration for registry ttl, error:=%+v, using default value %v instead"
----------------------------------------------------------------
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 #692: Fix: zk lost event
Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #692:
URL: https://github.com/apache/dubbo-go/pull/692
----------------------------------------------------------------
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 #692: Fix: zk lost event
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #692:
URL: https://github.com/apache/dubbo-go/pull/692#issuecomment-669000877
# [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/692?src=pr&el=h1) Report
> Merging [#692](https://codecov.io/gh/apache/dubbo-go/pull/692?src=pr&el=desc) into [master](https://codecov.io/gh/apache/dubbo-go/commit/abcc4df41c96b8b26d9e2d0154b13b2307469e7c&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `44.82%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/692/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/692?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #692 +/- ##
==========================================
- Coverage 63.88% 63.85% -0.03%
==========================================
Files 236 236
Lines 12313 12332 +19
==========================================
+ Hits 7866 7875 +9
- Misses 3680 3690 +10
Partials 767 767
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/692?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [remoting/zookeeper/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvem9va2VlcGVyL2xpc3RlbmVyLmdv) | `47.19% <38.46%> (-0.79%)` | :arrow_down: |
| [config/registry\_config.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-Y29uZmlnL3JlZ2lzdHJ5X2NvbmZpZy5nbw==) | `79.31% <100.00%> (+0.36%)` | :arrow_up: |
| [registry/zookeeper/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-cmVnaXN0cnkvem9va2VlcGVyL3JlZ2lzdHJ5Lmdv) | `56.29% <100.00%> (+0.58%)` | :arrow_up: |
| [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `78.02% <0.00%> (-2.20%)` | :arrow_down: |
| [protocol/dubbo/client.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY2xpZW50Lmdv) | `67.87% <0.00%> (-1.22%)` | :arrow_down: |
| [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `52.83% <0.00%> (ø)` | |
| [remoting/kubernetes/watch.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy93YXRjaC5nbw==) | `80.73% <0.00%> (+1.83%)` | :arrow_up: |
| [remoting/kubernetes/client.go](https://codecov.io/gh/apache/dubbo-go/pull/692/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9jbGllbnQuZ28=) | `78.75% <0.00%> (+2.50%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/692?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/692?src=pr&el=footer). Last update [abcc4df...7a88bab](https://codecov.io/gh/apache/dubbo-go/pull/692?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] wenxuwan commented on a change in pull request #692: Fix: zk lost event
Posted by GitBox <gi...@apache.org>.
wenxuwan commented on a change in pull request #692:
URL: https://github.com/apache/dubbo-go/pull/692#discussion_r466097206
##########
File path: remoting/zookeeper/listener.go
##########
@@ -37,6 +37,10 @@ import (
"github.com/apache/dubbo-go/remoting"
)
+var (
+ DefaultTTL = 15 * time.Minute
Review comment:
Yes, fix finished
----------------------------------------------------------------
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] wenxuwan commented on a change in pull request #692: Fix: zk lost event
Posted by GitBox <gi...@apache.org>.
wenxuwan commented on a change in pull request #692:
URL: https://github.com/apache/dubbo-go/pull/692#discussion_r466096907
##########
File path: remoting/zookeeper/listener.go
##########
@@ -197,10 +201,20 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
var (
failTimes int
+ ttl time.Duration
event chan struct{}
zkEvent zk.Event
)
event = make(chan struct{}, 4)
+ ttl = DefaultTTL
+ if conf != nil {
+ timeout, err := time.ParseDuration(conf.GetParam(constant.REGISTRY_TTL_KEY, constant.DEFAULT_REG_TTL))
+ if err == nil {
+ ttl = timeout
+ } else {
+ logger.Warnf("wrong configuration for registry ttl, error:=%+v", err)
Review comment:
done
----------------------------------------------------------------
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