zhangmeng916 commented on a change in pull request #1033:
URL: https://github.com/apache/helix/pull/1033#discussion_r431494734



##########
File path: 
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -1256,14 +1256,18 @@ protected void 
checkLiveInstancesObservation(List<LiveInstance> liveInstances,
 
         for (String instance : curInstances.keySet()) {
           if (lastInstances == null || !lastInstances.containsKey(instance)) {
-            try {
-              manager.addCustomizedStateRootChangeListener(this, instance);
-              logger.info(manager.getInstanceName() + " added customized root 
change listener for"
-                  + " " + instance
-                  + ", listener: " + this);
-            } catch (Exception e) {
-              logger.error("Fail to add customized root change listener for 
instance: " + instance,
-                  e);
+            PropertyKey propertyKey =
+                keyBuilder.customizedStatesRoot(instance);
+            if (propertyKey.getPath() != null) {
+              try {
+                manager.addCustomizedStateRootChangeListener(this, instance);
+                logger.info(
+                    manager.getInstanceName() + " added customized root change 
listener for" + " " + instance
+                        + ", listener: " + this);
+              } catch (Exception e) {
+                logger.error("Fail to add customized root change listener for 
instance: " + instance,

Review comment:
       I updated the log information. For log.info or log.debug, in the 
controller, all other listeners are added with log.info. I think this is for 
easy debug purpose. Please let me know if the previous convention should be 
changed.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to