Skip to content

Ensure reconnecting workers do not loose required data - #5436

Merged
fjetter merged 3 commits into
dask:mainfrom
fjetter:fix_flaky_reconnect_worker_tests
Oct 18, 2021
Merged

fjetter merged 3 commits into
dask:mainfrom
fjetter:fix_flaky_reconnect_worker_tests

Conversation

@fjetter

@fjetter fjetter commented Oct 18, 2021

Copy link
Copy Markdown
Member

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

Comment thread distributed/scheduler.py
worker_msgs[address].append(
{
"op": "free-keys",
"op": "remove-replicas",

Copy link
Copy Markdown
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 requested a review from crusaderky October 18, 2021 12:56
@fjetter
fjetter merged commit 7d2516a into dask:main Oct 18, 2021
@fjetter
fjetter deleted the fix_flaky_reconnect_worker_tests branch October 18, 2021 17:16
zanieb pushed a commit to zanieb/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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants