[Observability] Log interrupted processing tasks on unexpected worker…#9261
[Observability] Log interrupted processing tasks on unexpected worker…#9261prince8273 wants to merge 2 commits into
Conversation
… death When a worker drops off the cluster unexpectedly (e.g., due to an OOM kill), the scheduler tracks the processing_keys but previously did not log them to the console. This change surfaces exactly which tasks were interrupted, significantly improving debugging provenance for cluster hangs and memory crashes.
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 31 files ±0 31 suites ±0 11h 17m 10s ⏱️ - 13m 52s For more details on these failures, see this check. Results for commit 8213721. ± Comparison against base commit cf508b9. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
Hi @fjetter! The 3 failing checks are pre-existing flakes unrelated to this PR: test_RetireWorker_with_actor[True] (Ubuntu 3.14) — Worker.close() teardown timeout, a known slow test (~60s) Neither test touches the files changed in this PR (scheduler.py, test_scheduler.py). |
Description
Fixes #9263
This PR introduces targeted observability for interrupted processing tasks during unexpected worker disconnections (e.g., OOM kills or hardware failures).
Previously, when
remove_worker()was triggered withexpected=False, the scheduler correctly tracked theprocessing_keysbut failed to emit them to the logs. This created an observability gap where cluster operators could see a worker disconnect, but could not identify which specific task caused the failure without waiting for the task's retry limit to be exhausted.This change adds a surgical
logger.warningto surface the interruptedprocessing_keysprecisely at the time of the worker's death, significantly improving failure provenance and debugging workflows for large clusters.Implementation Details
Added a conditional log in
distributed/scheduler.py::remove_workerto printprocessing_keyswhen a worker drops unexpectedly (expected=False).Maintained consistency with the existing telemetry style of the adjacent
recompute_keysandlost_keyslogging blocks.Moved and updated
test_log_remove_workertodistributed/tests/test_scheduler.pyto correctly test scheduler-level logs and expect the new observability warning during ungraceful shutdowns.Tests added / passed
Passes
pre-commit run --all-files