-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix that task gets inserted multiple times into unfinishedTasks #4
fix that task gets inserted multiple times into unfinishedTasks #4
Conversation
Thank you!
And in the Scheduler adjust only this method:
Can you please confirm if this adjusts to your needs? |
It was not noticable in this version of KubernetesScheduler, because there were no important actions undertaken after Tasks finished. However, in my fork, I want to collect Tasks resource usage after Tasks finished. So I put my hook into taskWasFinished() and was confronted that this got called around 4 times per Task, and spoiled my statistics. Therefore I had to hunt down the cause and found it.
The comparison t.getState().getState().level > state.level must be less than, but otherwise that does the trick. I've updated the PR to reflect your proposed solution. |
Great, as you spotted this problem, the Commit should be fully assigned to you. Please change the log level from warning to debug. Four times per task is way too much. |
…cessary reformatting at onPodTermination
I've updated the PR accordingly |
Merged. Thank you! |
There is a problem with the pod/task termination, so that a task is inserted multiple times into the unfinishedTasks List.
I believe the cause is, that onPodTermination() would reset tasks that are already FINISHED or FINISHED_WITH_ERRORS back to PROCESSING_FINISHED.
This change fixes the issue in my local test setup.