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/06/16 06:28:04 UTC
[GitHub] [dubbo-go] wenxuwan opened a new pull request #613: try to fix panic when zk disconnected
wenxuwan opened a new pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
**Which issue(s) this PR fixes**:
try to fix #610
-->
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] pantianying merged pull request #613: Fix: zk disconnected, dubbo-go panic when subscribe.
Posted by GitBox <gi...@apache.org>.
pantianying merged pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613
----------------------------------------------------------------
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 #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#discussion_r441301128
##########
File path: remoting/zookeeper/listener.go
##########
@@ -247,8 +247,13 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
l.pathMapLock.Lock()
l.pathMap[dubboPath] = struct{}{}
l.pathMapLock.Unlock()
-
+ //When Zk disconnected, the Conn will be set to nil, so here need check the value of Conn
+ l.client.RLock()
+ if l.client.Conn == nil {
+ break
Review comment:
I have the same question. But travis still failing.
----------------------------------------------------------------
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 pull request #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
zouyx commented on pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#issuecomment-645128225
> > Travis failing
>
> 
>
> what's the meaning of Travis failing? As the picture shown, all checks have passed.
Sorry. File still conflicting
----------------------------------------------------------------
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 pull request #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
wenxuwan commented on pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#issuecomment-644684798
> Travis failing

what's the meaning of Travis failing? As the picture shown, all checks have passed.
----------------------------------------------------------------
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 #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
wenxuwan commented on a change in pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#discussion_r443340496
##########
File path: remoting/zookeeper/listener.go
##########
@@ -247,8 +247,13 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
l.pathMapLock.Lock()
l.pathMap[dubboPath] = struct{}{}
l.pathMapLock.Unlock()
-
+ //When Zk disconnected, the Conn will be set to nil, so here need check the value of Conn
+ l.client.RLock()
+ if l.client.Conn == nil {
+ break
Review comment:
是的。。。。
----------------------------------------------------------------
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 #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
wenxuwan commented on a change in pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#discussion_r441310144
##########
File path: remoting/zookeeper/listener.go
##########
@@ -247,8 +247,13 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
l.pathMapLock.Lock()
l.pathMap[dubboPath] = struct{}{}
l.pathMapLock.Unlock()
-
+ //When Zk disconnected, the Conn will be set to nil, so here need check the value of Conn
+ l.client.RLock()
+ if l.client.Conn == nil {
+ break
Review comment:
In my opinion, there is already have other case for trigger reconnect, so here may be just need stop the resubscribe process and wait reconnect finished.
By the way, the travis failed should not be caused by my changes, the error is:

may be you can re-trigger 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] pantianying commented on a change in pull request #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
pantianying commented on a change in pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#discussion_r443293269
##########
File path: remoting/zookeeper/listener.go
##########
@@ -247,8 +247,13 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
l.pathMapLock.Lock()
l.pathMap[dubboPath] = struct{}{}
l.pathMapLock.Unlock()
-
+ //When Zk disconnected, the Conn will be set to nil, so here need check the value of Conn
+ l.client.RLock()
+ if l.client.Conn == nil {
+ break
Review comment:
大哥 这里有死锁吧
----------------------------------------------------------------
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 pull request #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
wenxuwan commented on pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#issuecomment-645139232
> > > Travis failing
> >
> >
> > 
> > what's the meaning of Travis failing? As the picture shown, all checks have passed.
>
> Sorry. File still conflicting
ok, 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
[GitHub] [dubbo-go] hxmhlt commented on a change in pull request #613: try to fix panic when zk disconnected
Posted by GitBox <gi...@apache.org>.
hxmhlt commented on a change in pull request #613:
URL: https://github.com/apache/dubbo-go/pull/613#discussion_r441289919
##########
File path: remoting/zookeeper/listener.go
##########
@@ -247,8 +247,13 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
l.pathMapLock.Lock()
l.pathMap[dubboPath] = struct{}{}
l.pathMapLock.Unlock()
-
+ //When Zk disconnected, the Conn will be set to nil, so here need check the value of Conn
+ l.client.RLock()
+ if l.client.Conn == nil {
+ break
Review comment:
Can this case trigger to auto-reconnect?
----------------------------------------------------------------
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