-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Fix][Zeta] Fix unnecessary job state update #10132
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
Conversation
| } | ||
|
|
||
| public void startJob() { | ||
| public synchronized void startJob() { |
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.
Is this duplicated with #10133
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.
Yes, it is related, but I treated it as a separate concern from #10133.
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.
After going through the details, I agree that such issues do exist.
corgy-w
left a comment
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.
Thanks for your contribution.
davidzollo
left a comment
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.
+1
Purpose of this pull request
When
stateProcess()insideupdateJobState(JobStatus.PENDING)is executed asisRunningbecomes true, the job state is updated to RUNNING. Later,startJob()sets the job state to SCHEDULED again before immediately transitioning it back to RUNNING, causing an unnecessary intermediate state change.Does this PR introduce any user-facing change?
No.
How was this patch tested?
I believe the existing tests already cover this change.
Check list
New License Guide
incompatible-changes.mdto describe the incompatibility caused by this PR.