-
Notifications
You must be signed in to change notification settings - Fork 28.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-40106] Task failure should always trigger task failure listeners
### What changes were proposed in this pull request? Clean up the semantics of spark task listeners. Today, if a task body succeeds, but a completion listener fails, failure listeners are not called -- even tho the task has indeed failed at that point. The fix is to invoke failure listeners if a completion listener fails, before running the remaining completion listeners. ### Why are the changes needed? Failure listeners are not reliably called today, if the task failure is caused by a failed completion listener. This limits the utility of task listeners, especially ones that could assist with task cleanup. ### Does this PR introduce _any_ user-facing change? No changes to public methods, but failure listeners will now run when a completion listener fails, where previously they did not. ### How was this patch tested? New unit tests exercise various combinations of failed listeners, with a task body that did (or did not) throw. Closes #37531 from ryan-johnson-databricks/task-failure-listeners. Authored-by: Ryan Johnson <[email protected]> Signed-off-by: Josh Rosen <[email protected]>
- Loading branch information
1 parent
50c1635
commit 6cd9d88
Showing
4 changed files
with
295 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.