Swallowing the `CommClosedError` when the stream handler closes may remove relevant exception information
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
In https://github.com/dask/distributed/blob/5708bdf37fe8daf697115cd6c90c07148b6dffb1/distributed/core.py#L1027-L1033
we always swallow the `CommClosedError` without even logging it. This can be problematic because we use this error both for the happy and the sad path of stream handler closing. For example, in `convert_stream_closed_error` (https://github.com/dask/distributed/blob/5708bdf37fe8daf697115cd6c90c07148b6dffb1/distributed/comm/tcp.py#L130-L143), we may attach relevant exception information to the `CommClosedError` but will subsequently ignore it in `handle_stream`.
Ideally, we could differentiate between when stream handler closing is expected and when it's unexpected and log more information in the latter case.
Contributor guide
Assessment
This issue has not been assessed yet.