AndrewJSchofield commented on PR #18332:
URL: https://github.com/apache/kafka/pull/18332#issuecomment-2616292939

   > Thanks for your reply! It seems that all the public methods will 
eventually call the `reregister ` and the `unregister `. I think that the 
`unregister `method poses no potential risks after the `JmxReporter `is closed, 
so I put the check in the `reregister `method. wdyt?
   
   I prefer to do the closed check on every method which synchronizes on the 
lock. For one thing, some methods such as `metricRemoval` mess with the MBean, 
and then called `reregister` which fails. This doesn't seem like a very good 
pattern to me.


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