You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_transition_from_resumed contains legacy code and documentation #6693
_transition_from_resumed should not be reachable from a code path where ts._previous == "executing". Yet, it states this in the docstring and performs checks for this behavior. We should revisit the code and explanation and clean it up to improve readability.
Those lines do not cover the use case # Flight/executing finished unsuccessfully, i.e. not in memory.
If executing fails, the transition resumed->error is performed by _transition_generic_error, which causes all sorts of problems (Deadlock when a flaky task is stolen #6689).
if flight fails with GatherDepFailureEvent, you also have the same _transition_generic_error which... might? ... work as intended (missing a test).
if flight fails with GatherDepNetworkFailureEvent or GatherDepSuccessEvent (but no data), then you do have a transition to executing served by lines 1958+, and that's tested by test_workerstate_flight_failure_to_executing.
Activity
crusaderky commentedon Jul 9, 2022
These three are really the same issue:
_transition_from_resumedcontains legacy code and documentation #6693distributed/distributed/worker_state_machine.py
Lines 1948 to 1968 in 40867c7
Lines 1949-1953 are unreachable, because
if ts._previous == finish:does not do what the author thought:ts._previousis either executing, long-running, or flightfinishis either waiting, or fetch, or missingAs a side note, I'm unsure how a transition resumed->missing can ever happen, but I'm fairly sure there's no unit test for it.
As a consequence, the use case
is unwittingly covered by lines 1958+.
Those lines do not cover the use case
# Flight/executing finished unsuccessfully, i.e. not in memory._transition_generic_error, which causes all sorts of problems (Deadlock when a flaky task is stolen #6689)._transition_generic_errorwhich... might? ... work as intended (missing a test).test_workerstate_flight_failure_to_executing.