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

   ## What is the purpose of the change
   
   Backport of #28405 (commit `4acf53ae18e43055029864072f220087b32ac0e5`) to 
`release-2.3`.
   
   `SystemProcessingTimeServiceTest.testScheduleAtFixedRate` compared scheduled 
timestamps against a clock read that races the service's internal scheduling 
base. On a slow machine the failing assertion threw an `Error` out of the 
callback, which silently stops the periodic task in 
`ScheduledThreadPoolExecutor`, so the latch never counted down and the test 
hung into a bare `TimeoutException` that masked the real failure.
   
   ## Brief change log
   
     - Anchor the fixed-rate spacing check on the first observed timestamp 
instead of a racy second clock read.
     - Record any callback throwable into `errorRef` while still counting down, 
so a genuine drift fails fast with the real assertion.
     - Remove the fixed-delay first-execution check, which has no non-racy 
reference point. The fixed-delay spacing checks for later executions are kept.
   
   ## Verifying this change
   
   This change is covered by existing tests: `SystemProcessingTimeServiceTest`. 
Clean cherry-pick from `master`; no conflicts.
   
   ## 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
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (original commit generated by Claude Opus 4.8; backport 
cherry-pick prepared via Claude Code)
   
   Generated-by: Claude Opus 4.8 (1M context)
   


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