GrantPSpencer commented on code in PR #2607:
URL: https://github.com/apache/helix/pull/2607#discussion_r1303618411
##########
meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java:
##########
@@ -115,6 +117,61 @@ public void create(String key, Object data,
MetaClientInterface.EntryMode mode)
}
}
+ @Override
+ public void createFullPath(String key, Object data,
MetaClientInterface.EntryMode mode) {
+
+ boolean retry;
+ MetaClientInterface.EntryMode parentMode =
(EntryMode.EPHEMERAL.equals(mode) ?
+ EntryMode.PERSISTENT : mode);
+ do {
+ retry = false;
+ try {
+ create(key, data, mode);
+ } catch (MetaClientNoNodeException e) {
+ retry = true;
+ String parentPath = getZkParentPath(key);
+ try {
+ createFullPath(parentPath, null, parentMode);
+ } catch (MetaClientNodeExistsException e1) {
Review Comment:
Good point, it would just be excessive logging. Final error thrown/caught
should be enough
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]