[ https://issues.apache.org/jira/browse/FLINK-36209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
xiaochen.zhou updated FLINK-36209: ---------------------------------- Priority: Minor (was: Major) > Reduce some redundant operations in the initialization of KafkaSourceEnumState > ------------------------------------------------------------------------------ > > Key: FLINK-36209 > URL: https://issues.apache.org/jira/browse/FLINK-36209 > Project: Flink > Issue Type: Improvement > Reporter: xiaochen.zhou > Priority: Minor > > In some methods, such as the > {{DynamicKafkaSourceEnumerator#onHandleSubscribedStreamsFetch()}} method, > {{partitions}} are split into {{assignedPartitions}} and > {{unassignedInitialPartitions}} before initializing {{KafkaSourceEnumState}} > and used as parameters to its constructor. However, in the constructor of > {{KafkaSourceEnumState}}, these {{assignedPartitions}} and > {{unassignedInitialPartitions}} are merged back into {{partitions}}, > resulting in a lot of redundant operations and decreased performance. By > optimizing the code to directly use {{partitions}} as a parameter when > initializing {{KafkaSourceEnumState}}, we can avoid redundant operations and > improve performance. -- This message was sent by Atlassian Jira (v8.20.10#820010)