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

   ## What is the purpose of the change
   
   Fixes FLINK-41686: `SourceCoordinator` keyed entries in the shared 
`CoordinatorStore` watermark-alignment group by `operatorName`, so two sources 
with the same name in one group overwrote each other's watermarks. In addition, 
if an old `SourceCoordinator#close()` hits the 60 s close timeout during a 
`RecreateOnResetOperatorCoordinator` reset, the old instance's late write or 
removal could overwrite or delete the recreated coordinator's entry.
   
   Note: stacked on top of #29038 (`e6883df17c1`) for review; will be rebased 
onto `master` once #29038 merges.
   
   ## Brief change log
   
   - Keyed group-level watermark alignment entries by `(OperatorID, 
operatorName)` instead of `operatorName` alone.
   - Wrapped the shared group aggregator in `EpochWatermarkAggregator` so each 
`SourceCoordinator#start()` claims the next epoch, evicts any prior epoch's 
watermark, and ignores stale-epoch writes or removals.
   - Added an empty-group early return in `announceCombinedWatermark()`.
   
   ## Verifying this change
   
   - 
`SourceCoordinatorAlignmentTest#testDuplicateOperatorNameAcrossDistinctOperatorIds`
 and `testOverlappingCloseTimeoutDoesNotDeleteNewCoordinatorEntry` fail without 
the fix and pass with it.
   - Regression: `SourceCoordinatorAlignmentTest`, `SourceCoordinatorTest`, 
`SourceCoordinatorContextTest`, `SourceOperatorAlignmentTest`, 
`SourceOperatorSplitWatermarkAlignmentTest`, 
`RecreateOnResetOperatorCoordinatorTest`, `OperatorCoordinatorHolderTest`, and 
`WatermarkAlignmentITCase` pass locally.
   
   ## 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: yes
     - 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
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Antigravity (Gemini 4)
   


-- 
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