-
Notifications
You must be signed in to change notification settings - Fork 210
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
lambda processor should retry for certain class of exceptions #5320
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Srikanth Govindarajan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also have couple of couple of IT tests with retryable errors? If IT tests not possible, at least LambdaProcessor tests should be possible, right?
*/ | ||
private static final Set<Integer> TIMEOUT_ERRORS = new HashSet<>( | ||
Arrays.asList( | ||
408, // Request Timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this retryable category?
if(response == null) return false; | ||
int statusCode = response.statusCode(); | ||
// Example logic: 429 (Too Many Requests) or 5xx => retry | ||
return statusCode == 429 || (statusCode >= 500 && statusCode < 600); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have 429 in multiple places?
final InvokeResponse previousResponse, | ||
final Logger LOG | ||
) { | ||
int maxRetries = config.getClientOptions().getMaxConnectionRetries(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is max connection retries same as mac lambda retries? Because it is possible for a connection to be established immediately but failed due to server errors? Or are we trying to use the same config parameter for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess it was a bad naming for that field. The corresponding field is "max_retries", i am re-using that. I hope that is ok? I think there was another school of that we should indefinitely retry, but because this is a processor i thought it is better to retry for only certain number of times. We could also keep a different config for this and have a big but finite number assigned to this as default.
Description
Categorize exceptions as retryable and non-retryable for lambda plugin.
It should retry with backoff for certain number of times.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.