flink icon indicating copy to clipboard operation
flink copied to clipboard

[hotfix] [API/DataStream]: Ensure the proper triggering functionality of ContinuousProcessingTimeTrigger

Open beibei-li01 opened this issue 1 year ago • 1 comments

What is the purpose of the change

This pull request fixes an issue in ContinuousProcessingTimeTrigger that triggered logic failure when processingtime lasted longer than the maximum window time

Brief change log

When “time == window.maxTimestamp()”, increment the time parameter in registerNextFireTimestamp by one based on its original value, keeping it unchanged otherwise.

In registerNextFireTimestamp, when time is greater than window.maxTimestamp(), use time + interval as the next trigger value, otherwise, maintain the original logic.

For example, when processing historical data in the following way, the computation can be guaranteed to trigger every five seconds as expected, without failing to trigger or falling into a loop of continuous triggering: datastream .window(TumblingEventTimeWindows.of(Time.days(1), Time.hours(-8))) .trigger(ContinuousProcessingTimeTriggerCustomer.of(Time.seconds(5)))

Verifying this change

This change has been validated with business data and is correct.

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no The public API, i.e., is any changed class annotated with @Public(Evolving): no The serializers: no The runtime per-record code paths (performance sensitive): no Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no

beibei-li01 avatar Aug 15 '24 13:08 beibei-li01

CI report:

  • 39fe9fd7cc625b6cc6e808b3bbe95b5d79bae50b Azure: SUCCESS
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Aug 15 '24 13:08 flinkbot

This PR is being marked as stale since it has not had any activity in the last 90 days. If you would like to keep this PR alive, please leave a comment asking for a review. If the PR has merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out to the community, contact details can be found here: https://flink.apache.org/what-is-flink/community/

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

github-actions[bot] avatar Apr 07 '25 06:04 github-actions[bot]

This PR has been closed since it has not had any activity in 120 days. If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open the PR and ask for a review.

github-actions[bot] avatar May 08 '25 06:05 github-actions[bot]