-
Notifications
You must be signed in to change notification settings - Fork 13.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
[FLINK-19773][runtime] Implement ExponentialDelayStrategy #14425
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 3e9eb80 (Fri May 28 07:00:37 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
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 for creating this PR @mareksabo. It looks very good. I tried the changes out and they work well. The only thing which you need to do is to rerun mvn package -Dgenerate-config-docs -pl flink-docs,flink-core -DskipTests
in order to rebuild the configuration documentation. Once this is done and AZP passes, I will merge the PR.
double backoffMultiplier, | ||
Time resetBackoffThreshold, | ||
double jitterFactor | ||
) { |
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.
nit: using the style of this file, the closing parenthesis is usually put in the same line as the last parameter.
import static org.apache.flink.util.Preconditions.checkNotNull; | ||
|
||
/** | ||
* Restart strategy which tries to restart indefinitely number of times with a exponential backoff time in between. |
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.
* Restart strategy which tries to restart indefinitely number of times with a exponential backoff time in between. | |
* Restart strategy which tries to restart indefinitely number of times with an exponential backoff time in between. |
restartStrategy.notifyFailure(failure); | ||
assertCorrectRandomRange( | ||
restartStrategy::getBackoffTime, | ||
0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L); |
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.
Shouldn't we set the max backoff time to something like 7
in order to test that we will respect it? At the moment it is set to 9
which means that we won't exceed the max backoff time after three failures if I am not mistaken.
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.
You are right, nice catch!
@flinkbot run azure |
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 a lot for updating this PR @mareksabo. Merging this PR once AZP gives green light.
Thank you. Although I generated the documentation there was still some information missing in the docs -- I hope I just fixed that. @flinkbot run azure |
Really good work @mareksabo! |
What is the purpose of the change
This PR add new exponential restart strategy as described in FLINK-19773.
Brief change log
Added restart strategy for exponential backoff.
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation