[ 
https://issues.apache.org/jira/browse/KAFKA-9830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17077694#comment-17077694
 ] 

ASF GitHub Bot commented on KAFKA-9830:
---------------------------------------

gharris1727 commented on pull request #8442: KAFKA-9830: Implement 
AutoCloseable in ErrorReporter and subclasses
URL: https://github.com/apache/kafka/pull/8442
 
 
   * The DeadLetterQueueReporter has a KafkaProducer that it must close to 
clean up resources
   * Currently, the producer and it's threads are leaked every time a task is 
stopped
   * Responsibility for cleaning up ErrorReporters is transitively assigned to 
the
       ProcessingContext, RetryWithToleranceOperator, and 
WorkerSinkTask/WorkerSinkTask classes
   * One new unit test in ErrorReporterTest asserts that the producer is closed 
by the dlq reporter
   
   Signed-off-by: Greg Harris <gr...@confluent.io>
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
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:
us...@infra.apache.org


> DeadLetterQueueReporter leaks KafkaProducer instance
> ----------------------------------------------------
>
>                 Key: KAFKA-9830
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9830
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>    Affects Versions: 2.0.0
>            Reporter: Greg Harris
>            Priority: Major
>
> The DeadLetterQueueReporter (introduced by KAFKA-6738) creates a 
> KafkaProducer to report errors to Kafka, but does not clean up the producer, 
> leaving many idle network threads open after tasks are stopped.
> Reproduction steps:
> Start a task that has a non-empty DLQ topic name
> Stop the task
> Observe the list of running threads
> Expected result:
> There is no thread related to the stopped task's DLQ left running
> Actual result:
> There is a thread named something like kafka-producer-network-thread | 
> connector-dlq-producer-task-0" #1234 left running



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to