BJQ: initial state restore#28181
Conversation
allisonlarson
left a comment
There was a problem hiding this comment.
This looks like a good start! There are quite a few TODOs that I would be happy to have resolved/wait on a larger PR, but I'm also okay with getting it in so that we can flush things out that way.
| // When checking for workload placements, we never want to actually block | ||
| // in SetEnabled, but it's also entirely possible a queue eval is blocked and | ||
| // waiting to be placed from a previous DPQ placement. If that happens | ||
| // we should allow it to be processed via the initWorkload chan. |
There was a problem hiding this comment.
nit, initWorkload chan doesn't look like it made the cut
| } | ||
|
|
||
| if !placed { | ||
| // if this workload has been placed, we will push it to the queue. |
There was a problem hiding this comment.
nit: if this workload has not been placed?
There was a problem hiding this comment.
I'm just going to delete this comment because it's not super helpful 😄
| // Similar to waitForPlacement, isSchedulingComplete will record usage in the event an | ||
| // actual placement occurred. | ||
| // | ||
| // TODO see if can dedup with waitForPlacement |
There was a problem hiding this comment.
I know this is a TODO, but yeah the duplication of waitingForPlacement is high. What do you think about trying to address that a bit, even just for the goal of really highlighting the difference between them?
Description
These changes introduce state restore functionality to the DPQ. With these changes, a server can be stopped and restarted, and is able to restore tenant usage and identify batch jobs that a previous queue may have been waiting for placement.
Testing & Reproduction steps
Links
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad product documentation, which is stored in the
web-unified-docsrepo. Refer to theweb-unified-docscontributor guide for docs guidelines.Please also consider whether the change requires notes within the upgrade
guide. If you would like help with the docs, tag the
nomad-docsteam in this PR.and followed the AI usage guide.
Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.