Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow failed function executions to only mark some rows as failed #771

Open
Charles-Gagnon opened this issue Mar 27, 2023 · 2 comments
Open
Assignees
Labels
enhancement New feature or request P1 trigger
Milestone

Comments

@Charles-Gagnon
Copy link
Contributor

Currently if a function throws an exception it will fail the entire batch of rows sent, retrying them again in 60sec. This isn't great if a it was a single row that caused the exception - since it means that user functions need to be resilient to possibly retries and may end up with "good" rows being ignored if even a single bad row causes some exception.

It would be good to look into providing a way for functions to tell the trigger binding what rows it was able to successfully process and then only mark the ones that aren't in that list as needing to be retried.

@Charles-Gagnon Charles-Gagnon added enhancement New feature or request trigger labels Mar 27, 2023
@Charles-Gagnon Charles-Gagnon added this to the Trigger GA milestone Mar 27, 2023
@VasuBhog VasuBhog self-assigned this Apr 14, 2023
@MaddyDev MaddyDev modified the milestones: Trigger GA, Post GA Jul 5, 2023
@MaddyDev MaddyDev added the P1 label Feb 13, 2024
@MaddyDev
Copy link
Contributor

MaddyDev commented Feb 13, 2024

Lookup how and if cosmosdb has something similar in this failed scenarios. https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues

@VasuBhog
Copy link
Contributor

[Past context]

After discussions with team we would like to go into further detail with what you described as plausible options for enabling our SQL bindings extension to handle the issue of partial failures.

Overview of the Problem:
If a function throws an exception it will fail the entire batch of rows sent, retrying them again in 60sec. This may end up with "good" rows being ignored if even a single bad row causes some exception. Tracked here.

After some investigation I found that our SQL trigger logic we see here, we get the function result from “TryExecuteAsync” that returns the result whether it succeeds or fails. We would need to have modifications to what we get back from FunctionResult in order for us to see which specific rows failed, which would allow us to only specifically retry rows that are marked unsuccessful instead of the entire batch of rows.

As you mentioned in our discussion there is not anything built at the moment to support this or any extensions that have the ability to solve this. However you mentioned there would be ways we could work together to solve this from the Functions execution side and handle the scenario for identifying the faulty items (rows, messages, events, and collections for other extensions).

Any further contacts from your team or discussion with you on making an plan would be greatly appreciated.

Further information here: ​docx icon Allow Failed Function Executions to only to mark some rows as failed.docx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 trigger
Projects
None yet
Development

No branches or pull requests

3 participants