mirror of https://github.com/milvus-io/milvus.git
enhance: [10kcp] Add logs for querycoord checker (#38953)
issue: https://github.com/milvus-io/milvus/issues/37630 Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/38956/head^2
parent
c25fdf8080
commit
734a20ac01
|
@ -31,6 +31,7 @@ import (
|
|||
"github.com/milvus-io/milvus/internal/querycoordv2/task"
|
||||
"github.com/milvus-io/milvus/internal/querycoordv2/utils"
|
||||
"github.com/milvus-io/milvus/pkg/log"
|
||||
"github.com/milvus-io/milvus/pkg/util/timerecord"
|
||||
)
|
||||
|
||||
var errTypeNotFound = errors.New("checker type not found")
|
||||
|
@ -157,8 +158,10 @@ func (controller *CheckerController) Check() {
|
|||
|
||||
// check is the real implementation of Check
|
||||
func (controller *CheckerController) check(ctx context.Context, checkType utils.CheckerType) {
|
||||
tr := timerecord.NewTimeRecorder("checker.check")
|
||||
checker := controller.checkers[checkType]
|
||||
tasks := checker.Check(ctx)
|
||||
checkDur := tr.RecordSpan()
|
||||
|
||||
for _, task := range tasks {
|
||||
err := controller.scheduler.Add(task)
|
||||
|
@ -167,6 +170,8 @@ func (controller *CheckerController) check(ctx context.Context, checkType utils.
|
|||
continue
|
||||
}
|
||||
}
|
||||
log.Info("checker check done", zap.String("checker", checkType.String()), zap.Int("taskNum", len(tasks)),
|
||||
zap.Duration("checkDur", checkDur), zap.Duration("addDur", tr.RecordSpan()))
|
||||
}
|
||||
|
||||
func (controller *CheckerController) Deactivate(typ utils.CheckerType) error {
|
||||
|
|
|
@ -111,7 +111,7 @@ func (dh *distHandler) pullDist(ctx context.Context, failures *int, dispatchTask
|
|||
dh.handleDistResp(resp, dispatchTask)
|
||||
}
|
||||
log.Ctx(ctx).WithRateGroup("distHandler.pullDist", 1, 120).
|
||||
RatedInfo(120.0, "pull and handle distribution done",
|
||||
RatedInfo(120.0, "pull and handle distribution done", zap.Int64("nodeID", dh.nodeID),
|
||||
zap.Int("respSize", proto.Size(resp)), zap.Duration("pullDur", d1), zap.Duration("handleDur", tr.RecordSpan()))
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ func NewCollectionTarget(segments map[int64]*datapb.SegmentInfo, dmChannels map[
|
|||
}
|
||||
return &CollectionTarget{
|
||||
segments: segments,
|
||||
channel2Segments: channel2Segments,
|
||||
partition2Segments: partition2Segments,
|
||||
dmChannels: dmChannels,
|
||||
partitions: typeutil.NewSet(partitionIDs...),
|
||||
|
|
Loading…
Reference in New Issue