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

Should Worker.data_needed be priority-ordered? #5323

Closed
gjoseph92 opened this issue Sep 16, 2021 · 1 comment · Fixed by #5046
Closed

Should Worker.data_needed be priority-ordered? #5323

gjoseph92 opened this issue Sep 16, 2021 · 1 comment · Fixed by #5046

Comments

@gjoseph92
Copy link
Collaborator

Worker.data_needed is a list of tasks that need data to be fetched. Currently it's just FIFO by task submission time. So in theory, if a higher-priority task gets submitted after a lower-priority one, the low-priority one will get its data fetched first, and therefore probably run first.

I'm not sure in reality if this is much of an issue. We tend to see the biggest priority-vs-FIFO-ordering issues with root tasks; since they don't have dependencies, they're not relevant here. But it does just feel odd. The question is how often tasks with dependencies get submitted to workers out of priority order.

Switching this to a priority heap would be pretty easy and probably pretty cheap. There's even a TODO for it:

self.data_needed = deque() # TODO: replace with heap?

@fjetter
Copy link
Member

fjetter commented Sep 16, 2021

This is implemented in #5046

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 a pull request may close this issue.

2 participants