mirror of https://github.com/milvus-io/milvus.git
fix reduce latency metric (#19479)
Signed-off-by: wgcn <1026688210@qq.com> Signed-off-by: wgcn <1026688210@qq.com>pull/19247/head
parent
39be6e455a
commit
6972efe6ba
|
@ -231,7 +231,11 @@ func (s *searchTask) reduceResults(ctx context.Context, searchReq *searchRequest
|
|||
log.Ctx(ctx).Warn("marshal for historical results error", zap.Int64("msgID", s.ID()), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
defer deleteSearchResultDataBlobs(blobs)
|
||||
|
||||
defer func() {
|
||||
deleteSearchResultDataBlobs(blobs)
|
||||
s.reduceDur = s.tr.RecordSpan()
|
||||
}()
|
||||
|
||||
for i := 0; i < cnt; i++ {
|
||||
blob, err := getSearchResultDataBlob(blobs, i)
|
||||
|
@ -274,8 +278,9 @@ func (s *searchTask) reduceResults(ctx context.Context, searchReq *searchRequest
|
|||
SlicedNumCount: 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s.reduceDur = s.tr.RecordSpan()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue