rkhachatryan opened a new pull request #12401:
URL: https://github.com/apache/flink/pull/12401


   ## What is the purpose of the change
   
   Migrating `ContinuousFileReaderOperator` to mailbox execution model caused 
performance regression.
   This PR eliminates it by avoiding going through the mailbox unnecessarily.
   
   Local results before and after optimization (with [benchmark 
fix](https://github.com/dataArtisans/flink-benchmarks/pull/63) applied):
   ```
   ContinuousFileReaderOperatorBenchmark.readFileSplit  thrpt   30  10444.184 ± 
228.434  ops/ms
   ContinuousFileReaderOperatorBenchmark.readFileSplit  thrpt   30  31451.848 ± 
849.005  ops/ms
   ```
   Without the fix, results are better because it then does all the job in 
CLOSING phase in a loop. 
   So it's preferable to merge [benchmark 
fix](https://github.com/dataArtisans/flink-benchmarks/pull/63) first.
   
   ## Brief change log
   
     - loop in `ContinuousFileReaderOperator` if mailbox executor is idle
     - optimize `MailboxExecutor.isIdle`
   
   ## Verifying this change
   
     - correctness is covered by existing tests such as 
`ContinuousFileProcessingTest`
     - performance if measured by http://codespeed.dak8s.net:8000/
   
   ## 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): yes
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, 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
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to