-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor recover job #4515
refactor recover job #4515
Conversation
7fcb687
to
552b729
Compare
Codecov Report
@@ Coverage Diff @@
## master #4515 +/- ##
==========================================
+ Coverage 84.66% 84.69% +0.03%
==========================================
Files 1357 1357
Lines 135081 135160 +79
==========================================
+ Hits 114360 114475 +115
+ Misses 20721 20685 -36
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
if (optJob.getStatus() == cpp2::JobStatus::RUNNING && je->isMetaJob()) { | ||
jds.emplace_back(optJob); | ||
jds.emplace_back(std::move(optJob)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this would break the rule below?
for a balance job:
(1) if there's a newer finished balance job, the stopped or failed balance job can't be recovered.
(2) only the lasted stopped or failed balance job could be recovered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the guarantee is at jobmanager.cpp:832
} | ||
} | ||
} | ||
for (auto& jd : jds) { | ||
jd.setStatus(cpp2::JobStatus::QUEUE, true); | ||
jd.setStatus(cpp2::JobStatus::FAILED, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you prefer FAILED instead of QUEUED?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the rule 1
checked ent-3.3.0 |
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Description:
How do you solve it?
a meta job that used to be RUNNING would be set to FAILED when process restart
only jobs that are failed or stopped could be recovered
all recovered jobs would be set to QUEUE
for a balance job:
(1) if there's a newer finished balance job, the stopped or failed balance job can't be recovered.
(2) only the lasted stopped or failed balance job could be recovered
Special notes for your reviewer, ex. impact of this fix, design document, etc:
Checklist:
Tests:
Affects:
Release notes:
Please confirm whether to be reflected in release notes and how to describe: