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

Tharindu commented on KAFKA-9977:
---------------------------------

Kafka Connect is being run in distributed mode with defaults for all configs 
except the connectivity information with kafka. We had three worker nodes. 

To reproduce we can use the simple file sink connector. Example steps would be.
 # curl https://<server>/connectors -X POST -H 'Content-Type: application/json' 
-d '\{ "name": "sink-connector-example", "config": { "connector.class": 
"FileStreamSink", "tasks.max": "3", "file": "/tmp/test.sink.txt", "topics": 
"<topic>" } }' -k -u <user>:<pwd>
 # Wait till the tasks are created and start reporting task level metrics 
through JMX
 # curl https://<server>/connectors/sink-connector-example -X DELETE -k -u 
<user>:<password>
 # Now check the jmx metrics reported and check if the metrics for the deleted 
connector tasks still exist.

I've been able to reproduce with another sink connector as well. Have not tried 
with a source connector yet. 

> Kafka Connect Task level error metrics exposed via JMX not removed on 
> connector delete
> --------------------------------------------------------------------------------------
>
>                 Key: KAFKA-9977
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9977
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>    Affects Versions: 2.3.1
>            Reporter: Tharindu
>            Priority: Major
>              Labels: metrics
>
> When collecting metrics at a task level exposed via JMX it was noticed that 
> task level metrics reported under 
> *_kafka.connect:type=task-error-metrics,connector="\{connector}",task="\{task}"_*
> were not being removed on connector deletion resulting in us collecting 
> metrics for tasks no longer active. 
> In the source code I could not find a point where these metrics were cleaned 
> up. 



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

Reply via email to