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

   ## What is the purpose of the change
   
   Backport of https://github.com/apache/flink/pull/27883 to release-2.2.
   
   `DataGeneratorSourceITCase#testGatedRateLimiter` is flaky: 
`FirstCheckpointFilter` stops collecting in `snapshotState()`, so a checkpoint 
barrier that overtakes in-flight elements drops them and the size assertion 
fails.
   
   ## Brief change log
   
     - Cherry-picked f33b8211e8d0fe65186b1c6ea176d5b2399fe346 as 
b59084313f586f996063d44d51787b64880fd87e. It applied cleanly, with no 
differences from the original.
     - `FirstCheckpointFilter` now implements `CheckpointListener` and stops 
collecting in `notifyCheckpointComplete()`.
   
   ## Verifying this change
   
   This change is already covered by existing tests, such as 
`DataGeneratorSourceITCase`. It is a test-only change.
   
   Run with JDK 17 and Maven 3.8.6, five times in a row since this is a 
flaky-test fix:
   
   ```sh
   mvn -pl flink-connectors/flink-connector-datagen-test -am -Pskip-webui-build 
-Dtest='DataGeneratorSourceITCase' -Dsurefire.failIfNoSpecifiedTests=false 
package
   mvn -q -pl flink-connectors/flink-connector-datagen-test spotless:check 
checkstyle:check
   ```
   
   Result: all five runs passed (`Tests run: 7, Failures: 0, Errors: 0, 
Skipped: 1`; the skipped test is the already `@Disabled` 
`testFailingGeneratorFunctionInitialization`), and spotless and checkstyle 
passed. The test was not run without this change, so these runs do not show the 
flakiness going away; the fix itself rests on the analysis in the original pull 
request.
   
   ## 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
     - 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: Claude Code 2.1.316 (Claude Opus 5.5)
   
   cc @featzhang @RocMarshal
   


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