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/06/01 03:42:08 UTC
[GitHub] [dubbo-go] jack15083 commented on a change in pull request #1225: fix issue 1166: treat all zk child path url as new child
jack15083 commented on a change in pull request #1225:
URL: https://github.com/apache/dubbo-go/pull/1225#discussion_r642471712
##########
File path: remoting/zookeeper/listener.go
##########
@@ -323,12 +319,24 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
}
}
// Periodically update provider information
- ticker := time.NewTicker(ttl)
+ tickerTTL := ttl
+ if tickerTTL > 20e9 {
Review comment:
这里的ttl 是代码里写死的用户不可设置的 , 读取的是defautTtl的值

##########
File path: remoting/zookeeper/listener.go
##########
@@ -160,10 +160,6 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
newNode string
)
for _, n := range newChildren {
- if contains(children, n) {
Review comment:
这里去掉的话可能会造成goroutine 开启的过多吧 , 应该把之前监听的goroutine 关闭

##########
File path: remoting/zookeeper/listener.go
##########
@@ -160,10 +160,6 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
newNode string
)
for _, n := range newChildren {
- if contains(children, n) {
Review comment:
这里去掉的话可能会造成goroutine 开启的过多吧 , 应该把之前监听的goroutine 关闭

--
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