Skip to content

Conversation

@nl5887
Copy link
Contributor

@nl5887 nl5887 commented Jun 13, 2022

Currently in case of a panic in the task executor, no task status will be returned. This commit will catch panics and return the error as task result.

@nl5887 nl5887 force-pushed the feature-return-task-error-on-panic branch from 1031daf to c33d667 Compare June 13, 2022 13:39
Copy link
Contributor

@thinkharderdev thinkharderdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good improvement to me!

@andygrove
Copy link
Member

@nl5887 Do you have examples of panics that this fixes? Can we fix the root cause by using Result instead of calling panic! or unimplemented!?

@nl5887
Copy link
Contributor Author

nl5887 commented Jun 14, 2022

@nl5887 Do you have examples of panics that this fixes? Can we fix the root cause by using Result instead of calling panic! or unimplemented!?

One of the cases this occurs, is when schemas aren't compatible. (eg in situations of an expect()). With this commit, it at least will return that task failed, instead of keeping it open.

Completely agree with that the root causes should be fixed and using Result, but this fix is related to the edge cases.

@andygrove andygrove merged commit 74ffc8a into apache:master Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants