narendly commented on a change in pull request #1033:
URL: https://github.com/apache/helix/pull/1033#discussion_r434965873
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
##########
@@ -639,14 +639,20 @@ private void subscribeForChanges(NotificationContext.Type
callbackType, String p
}
}
} catch (ZkNoNodeException | HelixMetaDataAccessException e) {
- logger.warn(
- "fail to subscribe child/data change. path: " + path + ",
listener: " + _listener, e);
+ // TODO: avoid calling getChildren for path that does not exist
+ if (_changeType == CUSTOMIZED_STATE_ROOT) {
+ logger.warn("Failed to subscribe child/data change. path: {},
listener: {}", path,
+ _listener);
+ } else {
+ logger.warn("Failed to subscribe child/data change. path: {},
listener: {}", path,
+ _listener, e);
Review comment:
Can we just merge these two conditions? There's practically no
difference. Or catch exceptions separately and log an appropriate,
differentiated log message. Otherwise, this just looks like duplicate code.
----------------------------------------------------------------
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]