Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure reconnecting workers do not loose required data #5436

merged 3 commits into from Oct 18, 2021


Copy link

@fjetter fjetter commented Oct 18, 2021

Again a deadlock masked by mark.repeat flags. We should be more careful with these flags. This time, at least, this showed up as AssertionErrors in tests

If a worker briefly disconnects it has the chance to register what tasks it already has in memory and is currently executing. If it has data which is already released, it is also asked to release this. However, this introduces a subtle race condition where the worker is asked to release all it's data although we simultaneously would expect him to compute that keys dependent. Therefore, we should use the safe handler (remove-replica) instead of the strict handler (free-keys). See comment below for the proper section.

I took this chance to clean up the signature around free-keys to be in alignment with the rest

@@ -4339,9 +4343,9 @@ async def add_worker(
worker_msgs[address] = []
"op": "free-keys",
"op": "remove-replicas",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the relevant change

@fjetter fjetter merged commit 7d2516a into dask:main Oct 18, 2021
20 of 22 checks passed
@fjetter fjetter deleted the fix_flaky_reconnect_worker_tests branch October 18, 2021 17:16
madkinsz pushed a commit to madkinsz/distributed that referenced this pull request Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants