Skip to content

Commit

Permalink
gather_dep: don't request dependencies we already found out we don't …
Browse files Browse the repository at this point in the history
…want (#2428)
  • Loading branch information
tjb900 authored and mrocklin committed Dec 19, 2018
1 parent 9a327fb commit 0f06178
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion distributed/worker.py
Expand Up @@ -1594,8 +1594,10 @@ def gather_dep(self, worker, dep, deps, total_nbytes, cause=None):
if self.validate:
self.validate_state()

# dep states may have changed before gather_dep runs
# if a dep is no longer in-flight then don't fetch it
deps = tuple(dep for dep in deps
if self.dep_state.get(dep) in ('waiting', 'flight'))
if self.dep_state.get(dep) == 'flight')

self.log.append(('request-dep', dep, worker, deps))
logger.debug("Request %d keys", len(deps))
Expand Down

0 comments on commit 0f06178

Please sign in to comment.