Scheduler-side task prioritization is partially untested
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
You can currently apply the following patch without causing any tests in ``test_priority.py`` to trip:
```patch
--- a/distributed/scheduler.py
+++ b/distributed/scheduler.py
@@ -4939,7 +4939,7 @@ class Scheduler(SchedulerState, ServerNode):
# Compute recommendations
recommendations: dict = {}
- for ts in sorted(runnables, key=operator.attrgetter("priority"), reverse=True):
+ for ts in runnables:
if ts._state == "released" and ts._run_spec:
recommendations[ts._key] = "waiting"
@@ -8256,8 +8256,6 @@ def _add_to_memory(
state.add_replica(ts, ws)
deps: list = list(ts._dependents)
- if len(deps) > 1:
- deps.sort(key=operator.attrgetter("priority"), reverse=True)
dts: TaskState
s: set
```
This is a follow-up from #6077
CC @fjetter
Contributor guide
Assessment
This issue has not been assessed yet.