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

Fix scheduler initialisation startup race #4132

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

JamesMurkin
Copy link
Contributor

Currently the SubmitCheck.Run loads all the queues from the queue cache + executors from the database, this relies on QueueCache already having the queues loaded

As SubmitCheck.Run and QueueCache.Run are called at the same time in separate go routines, sometimes SubmitCheck.Run happens first and can't find the queues

  • When this happens, it blocks scheduling for 1 minute (until next SubmitCheck executor refresh)

I've added an Initialise method to QueueCache so we can call this during component creation, preventing the race described above

Currently the SubmitCheck.Run loads all the queues from the queue cache + executors from the database, this relies on QueueCache already having the queues loaded

As SubmitCheck.Run and QueueCache.Run are called at the same time in separate go routines, sometimes SubmitCheck.Run happens first and can't find the queues
 - When this happens, it blocks scheduling for 1 minute (until next SubmitCheck executor refresh)

I've added an Initialise method to QueueCache so we can call this during component creation, preventing the race described above

Signed-off-by: JamesMurkin <[email protected]>
Signed-off-by: JamesMurkin <[email protected]>
Signed-off-by: JamesMurkin <[email protected]>
Signed-off-by: JamesMurkin <[email protected]>
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.

1 participant