mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
Record load latency for loaded collection (#20538)
Signed-off-by: yah01 <yang.cen@zilliz.com> Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
parent
bec1d4c50f
commit
d37ebe538b
@ -64,8 +64,8 @@ var (
|
||||
Namespace: milvusNamespace,
|
||||
Subsystem: typeutil.QueryCoordRole,
|
||||
Name: "load_latency",
|
||||
Help: "latency of load request",
|
||||
Buckets: buckets,
|
||||
Help: "latency of load the entire collection",
|
||||
Buckets: []float64{0, 500, 1000, 2000, 5000, 10000, 20000, 50000, 60000, 300000, 600000, 1800000},
|
||||
}, []string{})
|
||||
|
||||
QueryCoordReleaseLatency = prometheus.NewHistogramVec(
|
||||
|
||||
@ -167,6 +167,7 @@ func (job *LoadCollectionJob) PreExecute() error {
|
||||
log.Warn(msg)
|
||||
return utils.WrapError(msg, ErrLoadParameterMismatched)
|
||||
}
|
||||
|
||||
return ErrCollectionLoaded
|
||||
}
|
||||
|
||||
|
||||
@ -158,9 +158,9 @@ func (ob *CollectionObserver) observeCollectionLoadStatus(collection *meta.Colle
|
||||
channelTargets := ob.targetMgr.GetDmChannelsByCollection(collection.GetCollectionID(), meta.NextTarget)
|
||||
targetNum := len(segmentTargets) + len(channelTargets)
|
||||
log.Info("collection targets",
|
||||
zap.Int("segment-target-num", len(segmentTargets)),
|
||||
zap.Int("channel-target-num", len(channelTargets)),
|
||||
zap.Int("total-target-num", targetNum))
|
||||
zap.Int("segmentTargetNum", len(segmentTargets)),
|
||||
zap.Int("channelTargetNum", len(channelTargets)),
|
||||
zap.Int("totalTargetNum", targetNum))
|
||||
|
||||
updated := collection.Clone()
|
||||
loadedCount := 0
|
||||
@ -187,8 +187,8 @@ func (ob *CollectionObserver) observeCollectionLoadStatus(collection *meta.Colle
|
||||
}
|
||||
if loadedCount > 0 {
|
||||
log.Info("collection load progress",
|
||||
zap.Int("sub-channel-count", subChannelCount),
|
||||
zap.Int("load-segment-count", loadedCount-subChannelCount),
|
||||
zap.Int("subChannelCount", subChannelCount),
|
||||
zap.Int("loadSegmentCount", loadedCount-subChannelCount),
|
||||
)
|
||||
}
|
||||
|
||||
@ -253,8 +253,8 @@ func (ob *CollectionObserver) observePartitionLoadStatus(partition *meta.Partiti
|
||||
}
|
||||
if loadedCount > 0 {
|
||||
log.Info("partition load progress",
|
||||
zap.Int("sub-channel-count", subChannelCount),
|
||||
zap.Int("load-segment-count", loadedCount-subChannelCount))
|
||||
zap.Int("subChannelCount", subChannelCount),
|
||||
zap.Int("loadSegmentCount", loadedCount-subChannelCount))
|
||||
}
|
||||
updated.LoadPercentage = int32(loadedCount * 100 / targetNum)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user