Skip to content
Snippets Groups Projects
Commit 0d353d2b authored by vito.he's avatar vito.he
Browse files

Fix:zk_hignmem_bug

parent f98d8d1c
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)
//Add to save into the path map to avoid duplicate listen
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