Add more debug log for proxy registry in rootcoord (#11899)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
pull/11921/head
Cai Yudong 2021-11-16 19:21:49 +08:00 committed by GitHub
parent ef7575fe29
commit b0f268e087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -101,8 +101,6 @@ func (p *proxyManager) WatchProxy() error {
}
for _, s := range sessions {
metrics.RootCoordProxyLister.WithLabelValues(metricProxy(s.ServerID)).Set(1)
}
for _, s := range sessions {
log.Debug("Get proxy", zap.Int64("id", s.ServerID), zap.String("addr", s.Address), zap.String("name", s.ServerName))
}
@ -140,6 +138,7 @@ func (p *proxyManager) WatchProxy() error {
}
}
p.lock.Lock()
log.Debug("watchProxy detect PUT event", zap.Int64("serverID", sess.ServerID))
for _, f := range p.addSessions {
f(sess)
}
@ -153,6 +152,7 @@ func (p *proxyManager) WatchProxy() error {
continue
}
p.lock.Lock()
log.Debug("watchProxy detect DELETE event", zap.Int64("serverID", sess.ServerID))
for _, f := range p.delSessions {
f(sess)
}

View File

@ -197,6 +197,7 @@ func (t *timetickSync) AddProxy(sess *sessionutil.Session) {
t.lock.Lock()
defer t.lock.Unlock()
t.proxyTimeTick[sess.ServerID] = nil
log.Debug("Add proxy for timeticksync", zap.Int64("serverID", sess.ServerID))
}
func (t *timetickSync) DelProxy(sess *sessionutil.Session) {
@ -204,6 +205,7 @@ func (t *timetickSync) DelProxy(sess *sessionutil.Session) {
defer t.lock.Unlock()
if _, ok := t.proxyTimeTick[sess.ServerID]; ok {
delete(t.proxyTimeTick, sess.ServerID)
log.Debug("Remove proxy from timeticksync", zap.Int64("serverID", sess.ServerID))
t.sendToChannel()
}
}