Skip to content
Snippets Groups Projects
Unverified Commit 83b3b9c5 authored by Xin.Zh's avatar Xin.Zh Committed by GitHub
Browse files

Merge pull request #168 from hxmhlt/fix_zk_hignmem_bug

Fix:zk high memory bug 
parents f98d8d1c 18a9a4c6
No related branches found
No related tags found
No related merge requests found
......@@ -208,6 +208,20 @@ func (l *ZkEventListener) listenDirEvent(zkPath string, listener remoting.DataLi
// listen l service node
dubboPath := path.Join(zkPath, c)
//Save the path to avoid listen repeatly
l.pathMapLock.Lock()
_, ok := l.pathMap[dubboPath]
l.pathMapLock.Unlock()
if ok {
logger.Warnf("@zkPath %s has already been listened.", zkPath)
continue
}
l.pathMapLock.Lock()
l.pathMap[dubboPath] = struct{}{}
l.pathMapLock.Unlock()
content, _, err := l.client.Conn.Get(dubboPath)
if err != nil {
logger.Errorf("Get new node path {%v} 's content error,message is {%v}", dubboPath, perrors.WithStack(err))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment