mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
Update rocksmq consume slowly log (#12179)
Signed-off-by: fishpenguin <kun.yu@zilliz.com>
This commit is contained in:
parent
6e452d1f02
commit
835451e331
@ -589,6 +589,7 @@ func (rmq *rocksmq) Consume(topicName string, groupName string, n int) ([]Consum
|
||||
}
|
||||
lock.Lock()
|
||||
defer lock.Unlock()
|
||||
getLockTime := time.Since(start).Milliseconds()
|
||||
|
||||
metaKey := constructCurrentID(topicName, groupName)
|
||||
currentID, err := rmq.kv.Load(metaKey)
|
||||
@ -669,9 +670,11 @@ func (rmq *rocksmq) Consume(topicName string, groupName string, n int) ([]Consum
|
||||
}
|
||||
|
||||
go rmq.updateAckedInfo(topicName, groupName, consumedIDs)
|
||||
log.Debug("Rocksmq produce successfully ", zap.String("topic", topicName),
|
||||
zap.String("groupName", groupName),
|
||||
zap.Int64("elapsed", time.Since(start).Milliseconds()))
|
||||
getConsumeTime := time.Since(start).Milliseconds()
|
||||
if getLockTime > 200 || getConsumeTime > 200 {
|
||||
log.Warn("rocksmq consume too slowly", zap.String("topic", topicName),
|
||||
zap.Int64("get lock elapse", getLockTime), zap.Int64("consume elapse", getConsumeTime))
|
||||
}
|
||||
return consumerMessage, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user