-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[FLINK-32023][API / DataStream] Support negative Duration for special usage, such as -1ms for execution.buffer-timeout #22560
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
Conversation
1996fanrui
left a comment
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.
Hi @Myracle , thanks for your contribution.
I see the CI fails, please run mvn spotless:apply before commiting.
flink-core/src/test/java/org/apache/flink/util/TimeUtilsTest.java
Outdated
Show resolved
Hide resolved
|
Could we not do this? This now break assumptions that every other component can make in that configured durations are always positive. Either use Configuration#getOptional (+ adding it by default to flink-conf.yaml) or add a boolean option to disable the timeout. |
|
@zentol I agree with you for that the change may affect other usages. What about adding a boolean config named execution.buffer-timeout.enabled which default value is true. When it is false, flushing only when the output buffer is full. At the same time, the execution.buffer-timeout's value will be ignored. cc @1996fanrui |
|
Thanks @zentol 's feedback here.
Sounds make sense. |
507ea2e to
a3ce22d
Compare
| "Tells if we should use compression for the state snapshot data or not"); | ||
|
|
||
| public static final ConfigOption<Boolean> BUFFER_TIMEOUT_ENABLED = | ||
| ConfigOptions.key("execution.buffer-timeout.enabled") |
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.
FLINK-29372 limited that the option key cannot be a prefix of other options, however execution.buffer-timeout is the prefix of execution.buffer-timeout.enabled. So the CI fails.
Hi @zentol , could we update the option key for BUFFER_TIMEOUT and mark the "execution.buffer-timeout" as the DeprecatedKey? How about update it to execution.buffer-timeout.interval ? Or do you have any suggestions here? Looking forward to your opinion.
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.
How about changing the config execution.buffer-timeout.enabled to execution.flush-on-buffer-full?
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.
Hi @Myracle , thanks for your feedback.
I see too many related option names that all have the same prefix but different suffixes. From the user's point of view, the same prefix also clearly tells the user that these options are related. Therefore, when FLINK-29372 restricts the option prefix, it also adds suffixes to many option names that do not conform to the specification.
So I prefer keep the prefixes the same for these 2 options. In order to the reasonable of this fix, I look forward to more feedback from community.
Hi @wanglijie95 @reswqa , would you mind take a look this PR in your free time? thanks a lot.
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.
Rename it to execution.buffer-timeout.interval and mark the old as deprecated key is ok from my side. But I want to hear @zentol's thoughts.
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.
BTW, I'm not sure do we need to start a discussion about this changes of configuration in the mailing list.
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.
+1 for name execution.buffer-timeout.interval
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.
Rename it to execution.buffer-timeout.interval. @zentol Would you like to give your thought? 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.
execution.buffer-timeout.interval and execution.buffer-timeout.enabled sound fine to me.
flink-core/src/main/java/org/apache/flink/configuration/ExecutionOptions.java
Outdated
Show resolved
Hide resolved
57d43fc to
a1f6d45
Compare
1996fanrui
left a comment
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 @Myracle 's update, LGTM.
|
I will merge this PR next Monday if no other comments. Hi @Myracle , could you help squash all commits? thanks~ |
…nabled to flush only when the output buffer is full.
a1f6d45 to
40636d9
Compare
|
@flinkbot run azure |
|
Thanks everyone who discussed here, and @Myracle 's contribution, merging. |
What is the purpose of the change
Support negative Duration for special usage, such as -1ms for execution.buffer-timeout
Brief change log
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation