Repository navigation
Addressing #5159 (IPv6 dask-worker support) by propagating empty host… - #5197
Conversation
|
Can one of the admins verify this patch? |
|
add to allowlist |
|
Given tests are failing, but they're also failing for the commit that this is based on, I will probably rebase this PR to 9569e08 so we get a better idea of which failures are actually a result of this change. |
… work from busy Worker Prior to this commit, task results required would be fetch only from local workers if they were available. If all local workers were busy, but the work were available on another machine, this would result in an indefinite delay. This patch allows local workers to be temporarily rejected, allowing for remote workers to provide the data when all local workers are busy.
|
Quick note -- I found a bug in the tests that could reasonably crop up in production while I was debugging some of the other test issues. The other bug is that, prior to this PR, workers would only fetch task data from a local worker when one is available, even if that worker is busy. One could imagine a set of long-running tasks that tie up the local worker, while a remote worker also has the data available and is not busy. In this case, the worker would wait on the local, long-running tasks, rather than just asking the remote worker for the data. There's a TODO on the fix -- I didn't see any So, I was thinking of resetting the 2nd TODO is line 2187 in distributed/workers.py should use |
|
I ended up splitting the |
| assert host_address.count(":") <= 1 or host_address.startswith( | ||
| "[" | ||
| ), "Host address with IPv6 must be bracketed like '[::1]'" |
There was a problem hiding this comment.
I've not seen assert used like this before. Would it be better to raise an exception here more explicitly?
There was a problem hiding this comment.
It would be different but same effect -- happy to make the change if you would like.
Other than this, does the PR look good?
There was a problem hiding this comment.
It would be different but same effect
Functionally it would be the same but by using a more familiar pattern the code is more maintainable. (I'm sure @mrocklin wrote a good blog post about the value of writing code that a novice contributor could understand but I am failing to find it)
Otherwise yeah this seems like a great change.
There was a problem hiding this comment.
Sure, change to ValueError pushed.
|
Just in case something about this PR is waiting on the CI tests to pass -- the remaining failures appear to be transient failures, unrelated to these changes. |
|
Yeah sorry I was waiting for CI to finish before merging and forgot to come back here. |
|
Thanks @wwoods |
… correctly
dask-workerbroken with IPv6? #5159. Seems to support dask-workers listening on both IPv4 and IPv6, as well as either/or. Solves dashboard log access problem mentioned in that bug, and appears to allow work to process.black distributed/flake8 distributed/isort distributed@jacobtomlinson Let me know what you think. Thanks!