You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/05/11 23:20:26 UTC
[GitHub] [helix] zhangmeng916 commented on a change in pull request #1732: Change Workflow monitor and PerInstanceResource monitor from static m…
zhangmeng916 commented on a change in pull request #1732:
URL: https://github.com/apache/helix/pull/1732#discussion_r630600737
##########
File path: helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
##########
@@ -898,26 +896,19 @@ private void unregisterPerInstanceResources(
throws MalformedObjectNameException {
synchronized (_perInstanceResourceMonitorMap) {
for (PerInstanceResourceMonitor.BeanName beanName : beanNames) {
- unregister(getObjectName(
- getPerInstanceResourceBeanName(beanName.instanceName(), beanName.resourceName())));
+ _perInstanceResourceMonitorMap.get(beanName).unregister();
Review comment:
Unregister already has a null check like this. Should be enough, right?
public static void unregister(ObjectName objectName) {
if (objectName != null && _beanServer.isRegistered(objectName)) {
try {
..................
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org