mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 12:29:36 +08:00
enhance: Remove metrics when target removed (#31399)
See also #31390 --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
2b7df47aa9
commit
c3d53eb1bf
@ -278,6 +278,16 @@ func (mgr *TargetManager) RemoveCollection(collectionID int64) {
|
||||
log.Info("remove collection from targets",
|
||||
zap.Int64("collectionID", collectionID))
|
||||
|
||||
current := mgr.current.getCollectionTarget(collectionID)
|
||||
if current != nil {
|
||||
for channelName := range current.GetAllDmChannels() {
|
||||
metrics.QueryCoordCurrentTargetCheckpointUnixSeconds.DeleteLabelValues(
|
||||
fmt.Sprint(paramtable.GetNodeID()),
|
||||
channelName,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
mgr.current.removeCollectionTarget(collectionID)
|
||||
mgr.next.removeCollectionTarget(collectionID)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user