fanyang opened a new pull request, #20564:
URL: https://github.com/apache/kafka/pull/20564

   The PR fixed an NPE when connectorStatusMetrics unregistering task. The 
issue will happen if a connector has more than 1 task on one worker and these 
tasks fail to start. For example, if the DNS cant resolve producer URL, tasks 
will fail to build. If these tasks failing to start, 
ConnectorStatusMetricsGroup will unregister them. After first task unregistered 
, connectorStatusMetrics removed connector. When second task calles 
recordTaskRemoved(), connectorStatusMetrics is empty, so 
connectorStatusMetrics.get(connectorTaskId.connector()).close(); will throw NPE.
   Like in method recordTaskAdded(), this fix checkes connectorStatusMetrics at 
the beginning of method recordTaskRemoved().


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to