diff --git a/internal/datacoord/compaction_task_clustering.go b/internal/datacoord/compaction_task_clustering.go index 230f4dcef21f8..8a3e39b41196f 100644 --- a/internal/datacoord/compaction_task_clustering.go +++ b/internal/datacoord/compaction_task_clustering.go @@ -558,7 +558,7 @@ func (t *clusteringCompactionTask) GetLabel() string { } func (t *clusteringCompactionTask) NeedReAssignNodeID() bool { - return t.GetState() == datapb.CompactionTaskState_pipelining && t.GetNodeID() == 0 + return t.GetState() == datapb.CompactionTaskState_pipelining && (t.GetNodeID() == 0 || t.GetNodeID() == NullNodeID) } func (t *clusteringCompactionTask) CleanLogPath() { diff --git a/internal/datacoord/compaction_task_l0.go b/internal/datacoord/compaction_task_l0.go index 2af08b53177e1..77fe6b0bd3abd 100644 --- a/internal/datacoord/compaction_task_l0.go +++ b/internal/datacoord/compaction_task_l0.go @@ -200,7 +200,7 @@ func (t *l0CompactionTask) SetStartTime(startTime int64) { } func (t *l0CompactionTask) NeedReAssignNodeID() bool { - return t.GetState() == datapb.CompactionTaskState_pipelining && t.GetNodeID() == NullNodeID + return t.GetState() == datapb.CompactionTaskState_pipelining && (t.GetNodeID() == 0 || t.GetNodeID() == NullNodeID) } func (t *l0CompactionTask) SetResult(result *datapb.CompactionPlanResult) { diff --git a/internal/datacoord/compaction_task_mix.go b/internal/datacoord/compaction_task_mix.go index d28c11944244c..8806ce985208a 100644 --- a/internal/datacoord/compaction_task_mix.go +++ b/internal/datacoord/compaction_task_mix.go @@ -169,7 +169,7 @@ func (t *mixCompactionTask) GetLabel() string { } func (t *mixCompactionTask) NeedReAssignNodeID() bool { - return t.GetState() == datapb.CompactionTaskState_pipelining && t.GetNodeID() == NullNodeID + return t.GetState() == datapb.CompactionTaskState_pipelining && (t.GetNodeID() == 0 || t.GetNodeID() == NullNodeID) } func (t *mixCompactionTask) processCompleted() bool {