mirror of https://github.com/milvus-io/milvus.git
Move release collection metrics to job (#24079)
Signed-off-by: sunby <bingyi.sun@zilliz.com> Co-authored-by: sunby <bingyi.sun@zilliz.com>pull/24173/head
parent
7384d83d2c
commit
a53beba14f
|
@ -86,6 +86,8 @@ func (job *ReleaseCollectionJob) Execute() error {
|
|||
waitCollectionReleased(job.dist, req.GetCollectionID())
|
||||
metrics.QueryCoordNumCollections.WithLabelValues().Dec()
|
||||
metrics.QueryCoordNumPartitions.WithLabelValues().Sub(float64(lenPartitions))
|
||||
metrics.QueryCoordReleaseCount.WithLabelValues(metrics.TotalLabel).Inc()
|
||||
metrics.QueryCoordReleaseCount.WithLabelValues(metrics.SuccessLabel).Inc()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,6 @@ func (s *Server) ReleaseCollection(ctx context.Context, req *querypb.ReleaseColl
|
|||
)
|
||||
|
||||
log.Info("release collection request received")
|
||||
metrics.QueryCoordReleaseCount.WithLabelValues(metrics.TotalLabel).Inc()
|
||||
tr := timerecord.NewTimeRecorder("release-collection")
|
||||
|
||||
if err := merr.CheckHealthy(s.State()); err != nil {
|
||||
|
@ -286,7 +285,6 @@ func (s *Server) ReleaseCollection(ctx context.Context, req *querypb.ReleaseColl
|
|||
}
|
||||
|
||||
log.Info("collection released")
|
||||
metrics.QueryCoordReleaseCount.WithLabelValues(metrics.SuccessLabel).Inc()
|
||||
metrics.QueryCoordReleaseLatency.WithLabelValues().Observe(float64(tr.ElapseSpan().Milliseconds()))
|
||||
meta.GlobalFailedLoadCache.Remove(req.GetCollectionID())
|
||||
|
||||
|
|
Loading…
Reference in New Issue