Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 作业驱逐功能纳入配额管理 #3090 #3091

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

wangyu096
Copy link
Collaborator

  1. 作业驱逐 op 操作的作业,也会从配额管理中删除配额占用
  2. 优化驱逐逻辑。
  • 原方案:只会更新作业/步骤状态,并且都放在 TaskEvictPolicyExecutor.updateEvictedTaskStatus() 方法中,同时更新多个事件目标(job+step)违反了执行引擎基于 job/step/gseTask 事件驱动的设计。另外,还有一个功能问题,作业状态统计、失败通知、API 回调等功能都无法触发。
  • 优化方案:无论在作业执行的那个阶段,判断作业需要被驱逐之后,只更新自身的状态;同时,发送一个 refresh 事件给上层对象执行响应操作(gseTask->step->job), 这样就能完整的处理整个作业对应生命周期中应该触发的所有操作。原 StepListener/JobListener#refresh() 中已实现了对 ABANDONED 状态的处理
image image 3. 删除部分冗余代码

@jsonwan jsonwan merged commit a75f0fc into TencentBlueKing:master Jul 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants