1996fanrui opened a new pull request, #29758:
URL: https://github.com/apache/flink/pull/29758

   ## What is the purpose of the change
   
   Backport of #29024 to release-1.20.
   
   ## Verifying this change
   
   - `./mvnw -pl flink-streaming-java -am -Pskip-webui-build 
-Dtest='StatusWatermarkValveTest,OneInputStreamTaskTest,TwoInputStreamTaskTest,WatermarkOutputMultiplexerTest,SourceOperatorSplitWatermarkAlignmentTest'
 -Dsurefire.failIfNoSpecifiedTests=false package` (JDK 11): `BUILD SUCCESS`
     - `StatusWatermarkValveTest`: `Tests run: 17, Failures: 0, Errors: 0, 
Skipped: 0`
     - `OneInputStreamTaskTest`: `Tests run: 13, Failures: 0, Errors: 0, 
Skipped: 0`
     - `TwoInputStreamTaskTest`: `Tests run: 11, Failures: 0, Errors: 0, 
Skipped: 0`
     - `WatermarkOutputMultiplexerTest`: `Tests run: 21, Failures: 0, Errors: 
0, Skipped: 0`
     - `SourceOperatorSplitWatermarkAlignmentTest`: `Tests run: 6, Failures: 0, 
Errors: 0, Skipped: 0`
   - `./mvnw -q -pl flink-streaming-java spotless:check checkstyle:check` (JDK 
11): passed
   - Reverted-fix run, with `StatusWatermarkValve.java` restored to the pre-fix 
version and the tests kept (JDK 11): `Tests run: 17, Failures: 3, Errors: 0, 
Skipped: 0`. The failures are the three tests this fix adds: 
`testMultipleInputFlushMaxWatermarkOnceAllInputsBecomeIdleWithUnalignedLastChannel`,
 `testRealignmentAfterResumeActiveEmitsNewMinWatermark`, 
`testWatermarkAdvancesWhenReactivatedChannelBecomesOnlyAlignedChannel`.
   
   ## Difference from the original
   
   | Original commit | Conflict | Byte-identical | Changes |
   | --- | --- | --- | --- |
   | bb773b5fb8a | No | No | File paths only: `StatusWatermarkValve` and its 
test live in `flink-streaming-java` on this branch, not `flink-runtime`. All 
added, removed, and context lines are identical. |
   
   The commit was cherry-picked from the release-2.2 backport, 022b7dce938, so 
it carries both `cherry picked from` lines.
   
   ## Notes
   
   - FLINK-38454 is not on release-1.20, so `CombinedWatermarkStatus` here does 
not flush the max watermark when all outputs are idle. The fix does not depend 
on it, but the comment this fix adds to `StatusWatermarkValve` ("This also 
keeps the valve consistent with the unconditional flush in 
CombinedWatermarkStatus"), and the same statement in the commit message, do not 
hold on this branch. I kept them unchanged so that the backport stays identical 
to the original; please say if you prefer to drop that comment sentence here.
   - The original pull request notes a behavior change: jobs that previously 
ended with a lower watermark depending on idle-arrival order now 
deterministically receive the flushed max watermark, so timers and windows in 
that range fire. The FLINK-40475 fix versions and the backport comment on the 
Jira cover 2.2, 2.3, and 2.4 only, so please confirm this is wanted on 1.20.
   
   cc @MartijnVisser
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (claude-opus-5-5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to