mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
fix: make grow task stale when node become stopping (#32556)
issue: #30816 #32526 pr: #31487 this PR fix that grow task stuck at stopping node Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
3352805afb
commit
fffbc1e3c1
@ -816,6 +816,10 @@ func (scheduler *taskScheduler) checkSegmentTaskStale(task *SegmentTask) error {
|
||||
for _, action := range task.Actions() {
|
||||
switch action.Type() {
|
||||
case ActionTypeGrow:
|
||||
if ok, _ := scheduler.nodeMgr.IsStoppingNode(action.Node()); ok {
|
||||
log.Warn("task stale due to node offline", zap.Int64("segment", task.segmentID))
|
||||
return merr.WrapErrNodeOffline(action.Node())
|
||||
}
|
||||
taskType := GetTaskType(task)
|
||||
var segment *datapb.SegmentInfo
|
||||
if taskType == TaskTypeMove || taskType == TaskTypeUpdate {
|
||||
@ -860,6 +864,10 @@ func (scheduler *taskScheduler) checkChannelTaskStale(task *ChannelTask) error {
|
||||
for _, action := range task.Actions() {
|
||||
switch action.Type() {
|
||||
case ActionTypeGrow:
|
||||
if ok, _ := scheduler.nodeMgr.IsStoppingNode(action.Node()); ok {
|
||||
log.Warn("task stale due to node offline", zap.String("channel", task.Channel()))
|
||||
return merr.WrapErrNodeOffline(action.Node())
|
||||
}
|
||||
if scheduler.targetMgr.GetDmChannel(task.collectionID, task.Channel(), meta.NextTargetFirst) == nil {
|
||||
log.Warn("the task is stale, the channel to subscribe not exists in targets",
|
||||
zap.String("channel", task.Channel()))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user