Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Oct 27, 2022
1 parent 5b7869c commit 06fff7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2090,9 +2090,6 @@ def decide_worker_rootish_queuing_disabled(
returns None, in which case the task should be transitioned to
``no-worker``.
"""
print(
f"decide_worker_rootish_queuing_disabled({ts.key}) tg={ts.group} lws={ts.group.last_worker}"
)
if self.validate:
# See root-ish-ness note below in `decide_worker_rootish_queuing_enabled`
assert math.isinf(self.WORKER_SATURATION)
Expand All @@ -2111,7 +2108,8 @@ def decide_worker_rootish_queuing_disabled(
):
ws = lws
else:
# Last-used worker is full, unknown, or non-running; pick a new worker for the next few tasks
# Last-used worker is full, unknown, retiring, or paused;
# pick a new worker for the next few tasks
ws = min(pool, key=partial(self.worker_objective, ts))
tg.last_worker_tasks_left = math.floor(
(len(tg) / self.total_nthreads) * ws.nthreads
Expand Down
3 changes: 1 addition & 2 deletions distributed/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def random(**kwargs):
client=True,
nthreads=[("", 1)],
config={"distributed.scheduler.work-stealing": False},
timeout=3,
)
async def test_decide_worker_rootish_while_last_worker_is_retiring(c, s, a):
"""https://github.com/dask/distributed/issues/7063"""
Expand Down Expand Up @@ -311,7 +310,7 @@ async def test_decide_worker_rootish_while_last_worker_is_retiring(c, s, a):
# not a running worker, so we must choose b
await evx[1].set()
await wait_for_state("y-2", "processing", s)
await wait_for_state("y-2", "waiting", b)
await wait_for_state("y-2", "waiting", b) # x-1 is in memory on a

# Cleanup
b.block_gather_dep.set()
Expand Down

0 comments on commit 06fff7c

Please sign in to comment.