1996fanrui opened a new pull request, #21690: URL: https://github.com/apache/flink/pull/21690
## What is the purpose of the change [FLINK-30533](https://issues.apache.org/jira/browse/FLINK-30533) doesn't check `recordWriter.isAvailable()` in the loop of SourceOperator. ## Brief change log - 1st commit: [FLINK-30623][runtime][refactor] Using the `DataOutput#canEmitBatchOfRecords` instead of `Supplier mailboxHasMail` - 2nd commit: [FLINK-30623][runtime][bug] The canEmitBatchOfRecords should check recordWriter and changelogWriterAvailabilityProvider are available I ran the checkpoint benchmark in my local, and here is the performance report, I think the performance is recovered after this PR. ``` Before 2nd commit: Benchmark (mode) Mode Cnt Score Error Units CheckpointingTimeBenchmark.checkpointSingleInput ALIGNED thrpt 30 1.247 ± 0.177 ops/s CheckpointingTimeBenchmark.checkpointSingleInput UNALIGNED thrpt 30 65.063 ± 9.090 ops/s CheckpointingTimeBenchmark.checkpointSingleInput UNALIGNED_1 thrpt 30 35.096 ± 4.313 ops/s After 2nd commit: Benchmark (mode) Mode Cnt Score Error Units CheckpointingTimeBenchmark.checkpointSingleInput ALIGNED thrpt 30 1.345 ± 0.111 ops/s CheckpointingTimeBenchmark.checkpointSingleInput UNALIGNED thrpt 30 299.665 ± 36.048 ops/s CheckpointingTimeBenchmark.checkpointSingleInput UNALIGNED_1 thrpt 30 183.998 ± 24.652 ops/s ``` ## Verifying this change This change is a trivial rework / code cleanup without any test coverage. ## 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 documented -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org