mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: Donot mark compaction tasks to be timeouted (#33833)
Signed-off-by: yangxuan <xuan.yang@zilliz.com>
This commit is contained in:
parent
62bd51ec6d
commit
dff7ec7bb2
@ -574,13 +574,13 @@ func (c *compactionPlanHandler) updateCompaction(ts Timestamp) error {
|
||||
}
|
||||
|
||||
case commonpb.CompactionState_Executing:
|
||||
// If it's still executing, DC will continue to wait, donot set tasks to be timeout here
|
||||
if c.isTimeout(ts, task.plan.GetStartTime(), task.plan.GetTimeoutInSeconds()) {
|
||||
log.Warn("compaction timeout",
|
||||
zap.Int32("timeout in seconds", task.plan.GetTimeoutInSeconds()),
|
||||
zap.Uint64("startTime", task.plan.GetStartTime()),
|
||||
zap.Uint64("now", ts),
|
||||
)
|
||||
c.plans[planID] = c.plans[planID].shadowClone(setState(timeout), endSpan())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -592,8 +592,7 @@ func (c *compactionPlanHandler) updateCompaction(ts Timestamp) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Timeout tasks will be timeout and failed in DataNode
|
||||
// need to wait for DataNode reporting failure and clean the status.
|
||||
// Notify failed tasks is marked to be timeout, and needs to clean status here
|
||||
for _, task := range timeoutTasks {
|
||||
log := log.With(
|
||||
zap.Int64("planID", task.plan.PlanID),
|
||||
|
||||
@ -745,7 +745,7 @@ func (s *CompactionPlanHandlerSuite) TestUpdateCompaction() {
|
||||
s.NoError(err)
|
||||
|
||||
task := handler.plans[1]
|
||||
s.Equal(timeout, task.state)
|
||||
s.Equal(executing, task.state)
|
||||
|
||||
task = handler.plans[2]
|
||||
s.Equal(executing, task.state)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user