You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Arvid Heise (Jira)" <ji...@apache.org> on 2024/09/19 06:26:00 UTC

[jira] [Resolved] (FLINK-36209) Remove redundant operations in the initialization of KafkaSourceEnumState

     [ https://issues.apache.org/jira/browse/FLINK-36209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arvid Heise resolved FLINK-36209.
---------------------------------
    Fix Version/s: kafka-3.3.0
         Assignee: xiaochen.zhou
       Resolution: Fixed

Merged into main as 52e7e580cd3b453a92a87afff4daf19ec53212dd.

> Remove redundant operations in the initialization of KafkaSourceEnumState
> -------------------------------------------------------------------------
>
>                 Key: FLINK-36209
>                 URL: https://issues.apache.org/jira/browse/FLINK-36209
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / Kafka
>            Reporter: xiaochen.zhou
>            Assignee: xiaochen.zhou
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: kafka-3.3.0
>
>
> In certain methods, such as the {{DynamicKafkaSourceEnumerator#onHandleSubscribedStreamsFetch()}} method, {{partitions}} are divided into {{assignedPartitions}} and {{unassignedInitialPartitions}} before being passed as parameters to the {{KafkaSourceEnumState}} constructor. However, within the constructor, these {{assignedPartitions}} and {{unassignedInitialPartitions}} are recombined into {{{}partitions{}}}, leading to unnecessary operations and reduced performance. By optimizing the code to pass {{partitions}} directly as a parameter when initializing {{{}KafkaSourceEnumState{}}}, we can eliminate redundant operations and enhance performance.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)