MartijnVisser opened a new pull request, #28648:
URL: https://github.com/apache/flink/pull/28648

   ## What is the purpose of the change
   
   Backport of #28608 to release-2.3.
   
   An interrupted timer-firing chain defers its continuation (and the 
downstream watermark emission) to a deferrable mail. The operator-finish drain 
skipped deferrable mails, so `EndOfData` could overtake the deferred watermark 
and downstream operators never received it, losing the state of windows that 
only fire on it (FLINK-39481, observed as `WindowDistinctAggregateITCase` 
exactly-once data loss after restore).
   
   The fix executes deferrable mails when finishing an operator.
   
   ## Brief change log
   
   Clean cherry-pick of 83055aead2e and bbc688cef98 from master.
   
   ## Verifying this change
   
   `StreamOperatorWrapperTest`, `MailboxExecutorImplTest` and 
`UnalignedCheckpointsInterruptibleTimersTest` (including the new 
`testDeferredWatermarkIsEmittedBeforeEndOfData`, the red-green test for this 
fix) pass on this branch. `WindowDistinctAggregateStressITCase` is included in 
the cherry-pick and is validated by CI.
   
   ## Does this pull request potentially affect one of the following parts:
   
   Same as #28608: no dependencies, no public API, no serializers, no 
per-record code paths; touches the operator-finish path of the task lifecycle.
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Claude Fable 5)
   
   Generated-by: Claude Fable 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