-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURATOR-728: Not issue ZooKeeper::create if possible in ZkPaths::mkdirs #518
CURATOR-728: Not issue ZooKeeper::create if possible in ZkPaths::mkdirs #518
Conversation
@@ -282,28 +282,29 @@ public static void mkdirs(ZooKeeper zookeeper, String path, boolean makeLastNode | |||
*/ | |||
public static void mkdirs( | |||
ZooKeeper zookeeper, | |||
String path, | |||
final String path, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Params are by default not be mutated. I suppose we don't need final to params.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM.
Hmm, I pushed to |
ed2d3ae
to
0fb6f3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some changes to test since last review. I am going to merge this if no doubt.
@@ -224,7 +224,7 @@ | |||
<dependency>org.apache.curator:curator-recipes</dependency> | |||
<dependency>org.apache.curator:curator-client</dependency> | |||
</dependenciesToScan> | |||
<excludedGroups>master</excludedGroups> | |||
<excludedGroups>master,ZOOKEEPER-2590</excludedGroups> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZOOKEEPER-2590 is never landed in 3.7 though it is tagged with 3.7.3.
@@ -31,7 +31,7 @@ | |||
<artifactId>curator-test-zk38</artifactId> | |||
|
|||
<properties> | |||
<zookeeper-38-version>3.8.3</zookeeper-38-version> | |||
<zookeeper-38-version>3.8.4</zookeeper-38-version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZOOKEEPER-2590 is landed in 3.8.4.
fail("Expected NoAuthException when not authorized to read new node grandparent"); | ||
} catch (KeeperException.NoAuthException noAuthException) { | ||
assertEquals(noAuthException.getPath(), "/bat"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old test reported NoAuth
on creating /bat/bost
. I think this is not the target CURATOR-715 trying to assert.
`ZkPaths::mkdir("/bar/foo")` will not run into `NoAuthException` if "/bar/foo" exists, and we have `READ` permission to "/bar/foo" but not `CREATE` permission to "/bar".
0fb6f3a
to
ba387f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this change @kezhuw . This makes the mkdirs ACLs constraints less restrictive which is a great improvement 🙏
@kezhuw thank you for fixing this. It helps to unblock our upgrade to Zookeeper 3.9.3. Do you know when will be the next release that include this patch ? |
…rs (apache#518) `ZkPaths::mkdir("/bar/foo")` will not run into `NoAuthException` if "/bar/foo" exists, and we have `READ` permission to "/bar/foo" but not `CREATE` permission to "/bar".
@yang-wei There is no schedule for next release yet. You could post mail to dev mailing list to let the community know. |
ZkPaths::mkdir("/bar/foo")
will not run intoNoAuthException
if"/bar/foo" exists, and we have
READ
permission to "/bar/foo" but notCREATE
permission to "/bar".