NicoK opened a new pull request #9287: [FLINK-13498][kafka] abort transactions in parallel URL: https://github.com/apache/flink/pull/9287 ## What is the purpose of the change This makes `FlinkKafkaProducer` abort transactions, e.g. during a first startup, in parallel making use of lingering CPU resources (using at most `kafkaProducersPoolSize` producers at once each, just like during runtime). Especially during that first startup (and thus also in tests), a lot of producers `(5*poolSize)` are being created at each sink instance to abort potentially existing previous transactions (in most cases, they don't exist). With this change, Kafka test times (on my PC) change like this: ``` FlinkKafkaProducerMigrationTest : 36.689s -> 29.438s FlinkKafkaProducerMigrationOperatorTest: 33.288s -> 26.232s ------ FlinkKafkaProducerITCase : 289.475s -> 228.469s KafkaITCase : 139.7s -> 127.595s FlinkKafkaInternalProducerITCase : 34.436s -> 35.391s KafkaProducerAtLeastOnceITCase : 391.627s -> 391.473s KafkaProducerExactlyOnceITCase : 84.366s -> 72.608s ``` ## Brief change log - change `FlinkKafkaProducer`: - abort transactions using a parallel stream - use a new thread pool with `size = kafkaProducersPoolSize` - do not use `#initTransactionalProducer()` but rather only instantiate the parts needed for aborting transactions, i.e. a `FlinkKafkaInternalProducer` - do the same for `FlinkKafkaProducer011` ## Verifying this change This change is already covered by existing tests, such as Kafka unit tests and ITCases. ## 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, 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? **JavaDocs**
---------------------------------------------------------------- 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] With regards, Apache Git Services
