imbajin commented on code in PR #336:
URL:
https://github.com/apache/incubator-hugegraph-computer/pull/336#discussion_r2444660658
##########
vermeer/apps/master/bl/scheduler_bl.go:
##########
@@ -222,68 +441,115 @@ func (s *ScheduleBl) startWaitingTask(agent
*schedules.Agent, taskInfo *structur
taskInfo.StartTime = time.Now()
err = taskStarter.StartTask()
+
+ // only for test or debug, record the task start sequence
Review Comment:
**缺少错误处理**: StartSequence 的错误只是被记录,但没有适当的处理。如果这是关键功能,应该考虑是否需要回滚或重试。
**建议**:
- 如果 StartSequence 是仅用于调试/测试,应该在注释中明确说明失败不会影响正常功能
- 如果是关键功能,应该考虑错误处理策略:
```go
if s.startSequence != nil {
if err := s.startSequence.StartSequence(taskInfo); err != nil {
logrus.Errorf("start sequence failed: %v, rolling back task", err)
s.taskManager.RemoveTask(taskInfo.ID)
return err
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]