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

Max Retries #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Max Retries #337

wants to merge 1 commit into from

Conversation

gfmio
Copy link

@gfmio gfmio commented Sep 1, 2023

This PR adds a maxRetries option that limits the amount of times a request will be attempted before the request is dropped. When set to the default value of -1, batches will be retried indefinitely which matches the current behaviour.

This provides a simple means to drop failed messages after a configurable number of attempts when such behaviour is desired, which is currently not very easy to implement.

This also addresses an issue with Flink Statefun where a pipeline will get stuck if a remote function fails deterministically and the issue cannot be caught inside the handler. Normally, such issues can and should be caught inside the handler code, but this is not possible if the server deterministically crashes, e.g. with log.Fatalw in golang. Setting a maxRetries limit prevents such behaviour from blocking pipelines indefinitely.

@gfmio gfmio marked this pull request as ready for review September 1, 2023 08:13
@davidradl
Copy link

davidradl commented Oct 4, 2023

Is there a Jira associated with this PR? The reason I ask, is that it would be useful to understand the impact of setting a max-retry and it failing in terms of the state of the system and recovery. I suspect this would be worthy of explaining and getting feedback in a Jira.

@gaoyibin0001
Copy link

There is already a issue here.
https://issues.apache.org/jira/browse/FLINK-26424?jql=project%20%3D%20FLINK%20AND%20text%20~%20%22statefun%22

Seems this project is no longer maintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants