mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +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",
|
log.Info("remove collection from targets",
|
||||||
zap.Int64("collectionID", collectionID))
|
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.current.removeCollectionTarget(collectionID)
|
||||||
mgr.next.removeCollectionTarget(collectionID)
|
mgr.next.removeCollectionTarget(collectionID)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user