Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Apr 14, 2022
1 parent 6d9011d commit 0e937b3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3046,9 +3046,7 @@ async def gather_dep(
for d in has_what:
ts = self.tasks[d]
ts.who_has.remove(worker)
if ts.state == "released":
continue
if not ts.who_has:
if not ts.who_has and ts.state in ("fetch", "flight"):
recommendations[ts] = "missing"
self.log.append(
("missing-who-has", worker, ts.key, stimulus_id, time())
Expand Down Expand Up @@ -3093,8 +3091,8 @@ async def gather_dep(
self.batched_stream.send(
{"op": "missing-data", "errant_worker": worker, "key": d}
)
if ts.state != "released":
recommendations[ts] = "fetch" if ts.who_has else "missing"
elif ts not in recommendations and ts.state in ("fetch", "flight"):
recommendations[ts] = "fetch" if ts.who_has else "missing"
del data, response
self.transitions(recommendations, stimulus_id=stimulus_id)

Expand Down

0 comments on commit 0e937b3

Please sign in to comment.