From 1d6bcd1dedd0f86fc603bd4ab5adc90818550811 Mon Sep 17 00:00:00 2001 From: yah01 Date: Mon, 25 Dec 2023 20:58:45 +0800 Subject: [PATCH] enhance: speed up loading with many deletions (#29455) the executor always fetches the latest segment info, so we could consume from the latest checkpoint, which could save much time while deleted many entities Signed-off-by: yah01 --- internal/querycoordv2/task/executor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/querycoordv2/task/executor.go b/internal/querycoordv2/task/executor.go index acd0d9602ef2f..41973c297f424 100644 --- a/internal/querycoordv2/task/executor.go +++ b/internal/querycoordv2/task/executor.go @@ -194,9 +194,9 @@ func (ex *Executor) loadSegment(task *SegmentTask, step int) error { indexes = nil } - channel := ex.targetMgr.GetDmChannel(task.CollectionID(), segment.GetInsertChannel(), meta.CurrentTarget) + channel := ex.targetMgr.GetDmChannel(task.CollectionID(), segment.GetInsertChannel(), meta.NextTarget) if channel == nil { - channel = ex.targetMgr.GetDmChannel(task.CollectionID(), segment.GetInsertChannel(), meta.NextTarget) + channel = ex.targetMgr.GetDmChannel(task.CollectionID(), segment.GetInsertChannel(), meta.CurrentTarget) } // Get collection index info