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

Ziyun Fu reassigned KAFKA-21168:
--------------------------------

    Assignee: Ziyun Fu  (was: Chia-Ping Tsai)

> The doBuild methods in Worker do not release resources on failure
> -----------------------------------------------------------------
>
>                 Key: KAFKA-21168
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21168
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Ziyun Fu
>            Priority: Minor
>
> {code:java}
>             KafkaProducer<byte[], byte[]> producer = new 
> KafkaProducer<>(producerProps);            TopicAdmin topicAdmin = null;
>             final boolean topicCreationEnabled = 
> sourceConnectorTopicCreationEnabled(sourceConfig);
>             if (topicCreationEnabled || 
> regularSourceTaskUsesConnectorSpecificOffsetsStore(sourceConfig)) {
>                 Map<String, Object> adminOverrides = 
> adminConfigs(id.connector(), "connector-adminclient-" + id, config,
>                         sourceConfig, connectorClass, 
> connectorClientConfigOverridePolicy, kafkaClusterId, ConnectorType.SOURCE);
>                 topicAdmin = new TopicAdmin(adminOverrides);
>             } {code}
> In the code above, the producer should be closed if any of the following 
> steps fail. The other doBuild methods have similar issues.



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

Reply via email to