Skip to content
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

Sort jobs by if they need db or not #646

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Sort jobs by if they need db or not #646

merged 1 commit into from
Aug 31, 2023

Conversation

bloodearnest
Copy link
Member

@bloodearnest bloodearnest commented Aug 29, 2023

This adds a natural priority to db jobs, ensuring they will always be
considered before cpu jobs.

Currently, enough cpu jobs to hit MAX_WORKERS will block db jobs from
starting, as they will be considered first.

Note, this is still sorted after workspace, so the fairness is still
preserved.

There are not tests for this, as this code currently has no test
coverage, as its a bit fiddly to implement.

Pulling in the bug fix from other branch, as its affect tests here, but am waiting on review for that branch

Copy link
Contributor

@madwort madwort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annoying we don't have any tests for this yet, but think this is worth trying in production

@bloodearnest bloodearnest removed the request for review from evansd August 31, 2023 13:07
This adds a natural priority to db jobs, ensuring they will always be
considered before cpu jobs.

Currently, enough cpu jobs to hit MAX_WORKERS will block db jobs from
starting, as they will be considered first.

Note, this is still sorted *after* workspace, so the fairness is still
preserved.

There are not tests for this, as this code currently has no test
coverage, as its a bit fiddly to implement.
@bloodearnest bloodearnest merged commit 7c29953 into main Aug 31, 2023
12 checks passed
@bloodearnest bloodearnest deleted the db-sorting branch August 31, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants