eolivelli commented on a change in pull request #11925:
URL: https://github.com/apache/pulsar/pull/11925#discussion_r702390310
##########
File path:
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java
##########
@@ -441,4 +439,41 @@ public long getZkSessionId() {
}
return CompletableFuture.completedFuture(null);
}
+
+ private static void asyncCreateFullPathOptimistic(final ZooKeeper zk,
final String originalPath, final byte[] data,
+ final CreateMode
createMode,
+ final
AsyncCallback.StringCallback callback) {
+ zk.create(originalPath, data, ZooDefs.Ids.OPEN_ACL_UNSAFE, createMode,
(rc, path, ctx, name) -> {
+ if (rc != Code.NONODE.intValue()) {
+ callback.processResult(rc, path, ctx, name);
+ } else {
+ String parent = (new
File(originalPath)).getParent().replace("\\", "/");
+
+ // Create parent nodes as "CONTAINER" so that ZK will
automatically delete them when they're empty
Review comment:
Can we add here a nite that old clusters may still have the old type?
--
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]