Print error when failed to broadcast message (#17595)

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
Jiquan Long 2022-06-16 18:32:10 +08:00 committed by GitHub
parent 04f836f516
commit 8e2797fe30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ func (d *dmlChannels) broadcast(chanNames []string, pack *msgstream.MsgPack) err
dms.mutex.RLock()
if dms.refcnt > 0 {
if err := dms.ms.Broadcast(pack); err != nil {
log.Error("Broadcast failed", zap.String("chanName", chanName))
log.Error("Broadcast failed", zap.Error(err), zap.String("chanName", chanName))
dms.mutex.RUnlock()
return err
}
@ -134,7 +134,7 @@ func (d *dmlChannels) broadcastMark(chanNames []string, pack *msgstream.MsgPack)
if dms.refcnt > 0 {
ids, err := dms.ms.BroadcastMark(pack)
if err != nil {
log.Error("BroadcastMark failed", zap.String("chanName", chanName))
log.Error("BroadcastMark failed", zap.Error(err), zap.String("chanName", chanName))
dms.mutex.RUnlock()
return result, err
}