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

HTTP-122 Add lookup retries #129

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

grzegorz8
Copy link
Member

Description

This PR introduces lookup retires. Retry mechanism in Sink will be implemented in a separate PR.

User can define for which HTTP status codes lookup request should be retried (source.lookup.error.retryable.code and source.lookup.error.retryable.code.exclude), and for which not (source.lookup.error.non-retryable.code and source.lookup.error.non-retryable.code.exclude). User can select one of three retry strategies (lookup.retry-strategy.type): none, fixed-delay or exponential-delay.

Resolves HTTP-122

PR Checklist

| gid.connector.http.lookup.error.code | optional | List of HTTP status codes that should be treated as errors by HTTP Source, separated with comma. |
| gid.connector.http.lookup.error.code.exclude | optional | List of HTTP status codes that should be excluded from the `gid.connector.http.lookup.error.code` list, separated with comma. |
| lookup.retry-strategy.type | optional | Defines the retry strategy to use in case of lookup failures. Accepted values are: `none` (default), `fixed-delay` and `exponential-delay`. |
| lookup.retry-strategy.fixed-delay.attempts | optional | The number of times that connector retries lookup execution before connector returns empty result. |
Copy link
Member Author

Choose a reason for hiding this comment

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

returns empty result

In current implementation, an empty result is returned if error status code is returned or when exception is thrown. To be honest I'm strongly against such approach. Errors should not be suppressed, at least by default. If error suppression is needed, user should have to configure it explicitly. WDYT?

ConfigOptions.key("lookup.retry-strategy.fixed-delay.attempts")
.intType()
.defaultValue(3)
.withDescription("The number of times that the connector retires request"
Copy link
Member Author

Choose a reason for hiding this comment

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

typos: retires and emtpy

@Raz0r Raz0r mentioned this pull request Oct 25, 2024
2 tasks
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.

1 participant