flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-36664][Window]Window with offset need deal offset when cal nextTriggerWatermark.

Open xing1mo opened this issue 1 year ago • 9 comments

What is the purpose of the change

Fixed the problem of data loss in window with offset.

Brief change log

Passing in window offset when cal nextTriggerWatermark.

Verifying this change

This change added tests and can be verified as follows:

  • Added test that validates that widow data with offset is not lost.

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
  • If yes, how is the feature documented? not applicable

xing1mo avatar Nov 08 '24 11:11 xing1mo

CI report:

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

flinkbot avatar Nov 08 '24 11:11 flinkbot

@xuyangzhong Dear xuyang, could you please review it for me when you have some time? Thank you!

xing1mo avatar Nov 14 '24 04:11 xing1mo

Reviewed by Chi on 05/12/24. Asked submitter questions

davidradl avatar Dec 05 '24 14:12 davidradl

@flinkbot run azure

xing1mo avatar Jan 10 '25 12:01 xing1mo

@flinkbot run azure

xing1mo avatar Jan 21 '25 06:01 xing1mo

Thanks for this contribution! LGTM overall. I just left some comments. BTW, could you please explain a little why the current ITCases do not cover these cases to expose this bug?

Thank you for your comments! I'm sorry, I can't find any harness test that sets the window offset. They all use the default offset=0. Could you give me an example of an existing test that might trigger this bug? And the test data in WindowAggregateITCase is too simple.

xing1mo avatar Feb 14 '25 02:02 xing1mo

Thanks for this contribution! LGTM overall. I just left some comments. BTW, could you please explain a little why the current ITCases do not cover these cases to expose this bug?

Thank you for your comments! I'm sorry, I can't find any harness test that sets the window offset. They all use the default offset=0. Could you give me an example of an existing test that might trigger this bug? And the test data in WindowAggregateITCase is too simple.

What about adding some source data for WindowAggregateITCase#testEventTimeTumbleWindowWithOffset, testCascadeEventTimeTumbleWindowWithOffset, etc to reproduce this bug and to verify this bugfix?

xuyangzhong avatar Feb 14 '25 05:02 xuyangzhong

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 May 15 '25 06:05 github-actions[bot]

@flinkbot run azure

xing1mo avatar May 15 '25 08:05 xing1mo