narendly commented on a change in pull request #1033:
URL: https://github.com/apache/helix/pull/1033#discussion_r431493134
##########
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) {
Review comment:
Yes, for backward compatibility, you need to check the root path
existence in ZK. This check is not very meaningful. You're basically doing `if
("~~/instanceName" != null)`, which always evaluates to true.
----------------------------------------------------------------
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]