-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BEAM-9742] Add Configurable FluentBackoff to JdbcIO Write #11396
Conversation
* This is the default {@link FluentBackoffConfiguration} that we use to retry when a {@link | ||
* SQLException} occurs. | ||
*/ | ||
public static class DefaultFluentBackoffConfiguration implements FluentBackoffConfiguration { |
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.
We can't make FluentBackoff part of the public API surface since it is in the util
package. It looks like other IO connectors have been creating their own RetryConfiguration
class such as:
SnsIO:
beam/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/sns/SnsIO.java
Line 262 in da9e172
public Write<T> withRetryConfiguration(RetryConfiguration retryConfiguration) { |
SolrIO:
public abstract static class RetryConfiguration implements Serializable { |
and then converting them to any internal implementation that makes sense.
Making FluentBackoff or a RetryConfiguration public and shared across implementation might make sense but warrants a discussion on the dev@ mailing list to see what the community thinks.
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.
@lukecwik - cool! I will mail the dev group.
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.
Waiting on updates on ML thread:
https://lists.apache.org/thread.html/r7fde7b5c87c6008689a013fc113d869d3ac15cbc7a35e4534469b9ab%40%3Cdev.beam.apache.org%3E
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.
It looks like we should stick with the pattern other IO authors have taken in the mean time.
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 agree with @lukecwik - we should stay consistent with that.
@lukecwik @aromanenko-dev @jfarr @timrobertson100 Let me know what you guys think needs to be done. |
Well, I didn't see any principal "against" to make FluentBackoff public but I'm not sure that it will be moved to another package or |
That makes sense to me. We can always expose it in the future and deprecate
existing IO specific versions.
…On Thu, May 7, 2020 at 9:12 AM Alexey Romanenko ***@***.***> wrote:
Well, I didn't see any principal "against" to make FluentBackoff public
but I'm not sure that it will be moved to another package or util will
become public soon. So for now, I'd rather keep the same strategy as we did
for other IOs by creating a custom RetryConfiguration for certain IO.
@lukecwik <https://github.com/lukecwik> wdyt?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11396 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACM4V3BEC7AEJ5AVMDDZ52LRQLMXRANCNFSM4MF4BJ7A>
.
|
That makes sense to me. We can always expose it in the future and deprecate existing IO specific versions. |
Hi, Cham requested that I take a look but I'm overloaded. Will attempt to look next week |
@udim no problem, I can take over of this PR |
Run Java PreCommit |
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.
@Akshay-Iyangar Following up the discussion here and on email thread, I propose to stay consistent with the RetryConfiguration
pattern that was already used in other IO. Please, address this comments.
Also, please, rebase your feature branch against current master to avoid the merge commits there.
* This is the default {@link FluentBackoffConfiguration} that we use to retry when a {@link | ||
* SQLException} occurs. | ||
*/ | ||
public static class DefaultFluentBackoffConfiguration implements FluentBackoffConfiguration { |
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 agree with @lukecwik - we should stay consistent with that.
Hi @Akshay-Iyangar, kind ping regarding this PR. |
@aromanenko-dev - Sorry for a little busy, will make the changes today. |
2364b71
to
01c11e7
Compare
@aromanenko-dev @lukecwik could you'll please have a look? Thanks |
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.
Thanks, it's almost LGTM. I left a couple of minor notes.
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
Outdated
Show resolved
Hide resolved
retest this please |
@aromanenko-dev - Addressed the feedback !! |
retest this please |
Run Java PreCommit |
2 similar comments
Run Java PreCommit |
Run Java PreCommit |
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.
Thanks, it LGTM. I'm going to merge it once Java PreCommit will be green.
@lukecwik Do you have something to add?
Run Java PreCommit |
3 similar comments
Run Java PreCommit |
Run Java PreCommit |
Run Java PreCommit |
retest this please |
I'm going to merge this PR since the failed test |
) * [BEAM-9742] revert back to the older version * [BEAM-9742] Using retry configuration for fluent-backoff * [BEAM-9742] fixing checkstyle errors. * [BEAM-9742] Addressing feedback Co-authored-by: aiyangar <[email protected]>
Add Configurable FluentBackoff to JdbcIO Write
Jira ticket
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.