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 2020/05/28 17:13:31 UTC
[GitHub] [helix] mgao0 commented on a change in pull request #1033: Add path existing check for customized state
mgao0 commented on a change in pull request #1033:
URL: https://github.com/apache/helix/pull/1033#discussion_r431995256
##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
##########
@@ -591,8 +591,11 @@ public void addCurrentStateChangeListener(org.apache.helix.CurrentStateChangeLis
@Override
public void addCustomizedStateRootChangeListener(CustomizedStateRootChangeListener listener,
String instanceName) throws Exception {
- addListener(listener, new Builder(_clusterName).customizedStatesRoot(instanceName),
- ChangeType.CUSTOMIZED_STATE_ROOT, new EventType[]{EventType.NodeChildrenChanged});
+ PropertyKey propertyKey = _dataAccessor.keyBuilder().customizedStatesRoot(instanceName);
+ if (_zkclient.exists(propertyKey.getPath())) {
+ addListener(listener, new Builder(_clusterName).customizedStatesRoot(instanceName),
+ ChangeType.CUSTOMIZED_STATE_ROOT, new EventType[]{EventType.NodeChildrenChanged});
+ }
Review comment:
Did we say that if participant's version is older than the controller version, it's fine? If so then I think we may not need to log it.
----------------------------------------------------------------
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