dask / dask/distributed

Propagate reason to client-side `FutureCancelledError` when closing the scheduler

Open
#8,830 2 comments 9 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

`Scheduler.close` takes a `reason` keyword which allows us to provide additional context. However, when it comes to cancelling client-side futures, we simply abort the comm causing the Client to cancel the futures with `reason=scheduler-connection-lost`. It would be great if we could propagate the closing reason to the client and use it when cancelling futures in order to help users understand what's happening. For example, if the scheduler shuts down due to the `idle-timeout` kicking in, it would be great it we told the users that the futures were cancelled because we exceeded the timeout, not because we lost the connection due to some unknown reason.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.