This is an automated email from the ASF dual-hosted git repository.

laurence pushed a commit to branch 1.5
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/1.5 by this push:
     new 66fbce2  remove pathdMap when send data change event fail (#1273)
66fbce2 is described below

commit 66fbce2a6e140dcd16aaf762646423611ae01269
Author: Baster <[email protected]>
AuthorDate: Fri Jun 25 13:19:00 2021 +0800

    remove pathdMap when send data change event fail (#1273)
    
    Co-authored-by: zengfanwei <[email protected]>
---
 remoting/zookeeper/listener.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/remoting/zookeeper/listener.go b/remoting/zookeeper/listener.go
index a708b83..c6a2f9c 100644
--- a/remoting/zookeeper/listener.go
+++ b/remoting/zookeeper/listener.go
@@ -307,6 +307,10 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, 
zkPath string, listen
                        }
                        logger.Debugf("Get children!{%s}", dubboPath)
                        if !listener.DataChange(remoting.Event{Path: dubboPath, 
Action: remoting.EventTypeAdd, Content: string(content)}) {
+                               logger.Warnf("Send remoting event EventTypeAdd 
fail, path {%v}", dubboPath)
+                               l.pathMapLock.Lock()
+                               delete(l.pathMap, zkPath)
+                               l.pathMapLock.Unlock()
                                continue
                        }
                        logger.Infof("listen dubbo service key{%s}", dubboPath)

Reply via email to