[FLINK-35661][table] Fix MiniBatchGroupAggFunction silently dropping records (backport #27505)#28262
[FLINK-35661][table] Fix MiniBatchGroupAggFunction silently dropping records (backport #27505)#28262nateab wants to merge 1 commit into
Conversation
|
@flinkbot run azure Previous failure was in |
|
@flinkbot run azure |
…records When finishBundle() encounters a key with only retraction messages and no existing state, it now uses 'continue' instead of 'return' to skip that key and continue processing remaining keys in the bundle. This change adds a unit test using KeyedOneInputStreamOperatorTestHarness with KeyedMapBundleOperator to verify the fix. (cherry picked from commit b81b124)
eb3440c to
b49ec0c
Compare
|
Force-pushed identical content with new timestamp to trigger a fresh Azure build ( New SHA: The previous |
weiqingy
left a comment
There was a problem hiding this comment.
Thanks for the backport, and for the provenance notes — the cherry-pick SHA and the byte-identical claim made this quick to verify.
I checked the backport against master:
- The
return→continuefix infinishBundle()is byte-identical to the merged master commit. MiniBatchGroupAggFunctionTest.javais byte-identical to the test merged in #27505.- The Azure failure is the
MinioTestContainerTestflake inflink-s3-fs-base, unrelated to the table-runtime change and consistent with the other release-1.20 PRs you referenced.
Nothing further from me — the backport looks faithful. I'll leave the final call to the maintainers.
Backport of #27505 to
release-1.20.What is the purpose of the change
This pull request fixes a bug in
MiniBatchGroupAggFunction.finishBundle()where records were being silently dropped when a mini-batch bundle contained a key with only retraction messages and no existing accumulator state.The root cause was using
returninstead ofcontinuewheninputRowsbecame empty after filtering out leading retraction messages for a key with no state. This caused the method to exit entirely, abandoning processing of all remaining keys in the bundle.Brief change log
return;tocontinue;inMiniBatchGroupAggFunction.finishBundle()so processing continues to the next key instead of exiting the entire methodMiniBatchGroupAggFunctionTestthat directly verifies the fix by simulating a bundle with multiple keys where the first key has only retractionsVerifying this change
This change added tests and can be verified as follows:
MiniBatchGroupAggFunctionTest.testFinishBundleContinuesAfterEmptyInputRows()which creates a mock bundle with three keys where the first key has only a DELETE message (no existing state). The test verifies that:Backport notes:
release-1.20:Tests run: 1, Failures: 0, Errors: 0.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation