mirror of https://github.com/milvus-io/milvus.git
fix: Fix cornor case that segment can't be move out from stopping node (#36431)
issue: #36426 the old constriant requires only segment on current target can be balanced, which is wrong, and caused that segment can't be move out from stopping node, if it's only exist in next target. by design, stopping balance need to move out all segment on it by balance task, thus the unfair old constriant should be removed. Signed-off-by: Wei Liu <wei.liu@zilliz.com>pull/36292/head
parent
52cce4de58
commit
3bd7ec8751
|
@ -941,12 +941,7 @@ func (scheduler *taskScheduler) checkSegmentTaskStale(task *SegmentTask) error {
|
|||
return merr.WrapErrNodeOffline(action.Node())
|
||||
}
|
||||
taskType := GetTaskType(task)
|
||||
var segment *datapb.SegmentInfo
|
||||
if taskType == TaskTypeMove || taskType == TaskTypeUpdate {
|
||||
segment = scheduler.targetMgr.GetSealedSegment(task.CollectionID(), task.SegmentID(), meta.CurrentTarget)
|
||||
} else {
|
||||
segment = scheduler.targetMgr.GetSealedSegment(task.CollectionID(), task.SegmentID(), meta.NextTargetFirst)
|
||||
}
|
||||
segment := scheduler.targetMgr.GetSealedSegment(task.CollectionID(), task.SegmentID(), meta.CurrentTargetFirst)
|
||||
if segment == nil {
|
||||
log.Warn("task stale due to the segment to load not exists in targets",
|
||||
zap.Int64("segment", task.segmentID),
|
||||
|
|
Loading…
Reference in New Issue