Skip to content

Commit

Permalink
fix: Fix no L0 compaction tasks are executed (milvus-io#34537)
Browse files Browse the repository at this point in the history
The nodeID for compaction task initialization is 0. This PR adjusts the
task reassignment conditions to allow new compaction tasks to be
reassigned and executed.

issue: milvus-io#34460

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
  • Loading branch information
bigsheeper authored Jul 15, 2024
1 parent 8b5754f commit 1495b7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/datacoord/compaction_task_clustering.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion internal/datacoord/compaction_task_l0.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/datacoord/compaction_task_mix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1495b7a

Please sign in to comment.