Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable HTTP Sink request retries#120

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
grzegorz8 wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromenable-http-sink-retries

Conversation

@grzegorz8
Copy link
Member

@grzegorz8grzegorz8 commentedAug 28, 2024
edited
Loading

Description

Currently HTTP Sink does not retry failed requests which make it impossible to use in many scenarios.

This PR allows to define expected behaviour by settingsink.delivery-guarantee: eithernone (no retries, this is effectively the same as at-most-once) orat-least-once.exactly-once is not supported.

Implemented based on aws connectors usingAsyncSinkBase, for example:https://github.com/apache/flink-connector-aws/blob/main/flink-connector-aws/flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/sink/KinesisStreamsSinkWriter.java#L213-L223

PR Checklist

amstee reacted with thumbs up emojijonathanlehto reacted with eyes emoji
.collect(Collectors.toList());
}

publicList<HttpRequest>getFailedRequests() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I did a google and found.https://stackoverflow.com/questions/47680711/which-http-errors-should-never-trigger-an-automatic-retry . It seems to be that you should only retry if the status code is retriable. Maybe group into successful, retriable and failed (no retry).

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thanks! Good point. I may refactor the code so that there are 3 statuses as you suggested. The change may also affect lookup, not only sink. So as a "side-effect" I may introduce lookup retry feature :)

// See com.getindata.connectors.http.internal.sink.httpclient.
// JavaNetSinkHttpClient#putRequests where requests are submitted sequentially and
// then their futures are joined sequentially too.
List<HttpSinkRequestEntry>failedRequestEntries =newArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have multiple values for the same key in one list ofrequestEntries? It seems to me that by introducing retry mechanism we can interfere with final entries ordering. That may be the case, when latest key entry is saved successfully and then older is retried, effectively overwriting latest value. Do I read that correctly?

@Raz0rRaz0r mentioned this pull requestOct 25, 2024
2 tasks
@davidradldavidradl added community-reviewedTest label for flip-518 and removed community-reviewedTest label for flip-518 labelsJun 26, 2025
@jonathanlehtojonathanlehto mentioned this pull requestOct 30, 2025
2 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@MarekMajMarekMajMarekMaj left review comments

@davidradldavidradldavidradl left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@grzegorz8@MarekMaj@davidradl

[8]ページ先頭

©2009-2025 Movatter.jp