Kill tasks below a certain priority level#1052
Conversation
| requestIdToTaskPriority.put(requestWithState.getRequest().getId(), requestWithState.getRequest().getTaskPriorityLevel().or(defaultTaskPriorityLevel)); | ||
| } | ||
|
|
||
| // cancel pending tasks below minimum priority level |
There was a problem hiding this comment.
I'd be worried about deleting pending tasks, because there won't necessarily be a pending request in the queue to put them back when we undo the freeze. We would have to do something like we do on startup where we loop over all tasks. Maybe the mesos scheduler that processes offers should just be smart enough to ignore those pending tasks? (and maybe sort the scheduling by request priority as well?)
There was a problem hiding this comment.
That's a fair point -- I certainly don't want to introduce new edge-cases due to deleting pending tasks. I'll update this to ignore pending tasks below the minimum priority level and deal with the fact that it'll cause task lag alerts (which could be good anyways -- a nice reminder that you have a priority freeze enabled...)
There was a problem hiding this comment.
Addressed your feedback in the latest commit. Not going to tackle sorting scheduled tasks by priority quite yet, but may do it in a future PR.
…ing request, add validation to deploy
Sort task requests by priority order
|
Fixed merge conflict with master, going to merge this one. |
No description provided.