ztzg commented on code in PR #2222:
URL: https://github.com/apache/zookeeper/pull/2222#discussion_r1950277286
##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java:
##########
@@ -462,8 +462,9 @@ public void createNode(final String path, byte[] data,
List<ACL> acl, long ephem
// we did for the global sessions.
Long acls = aclCache.convertAcls(acl);
- Set<String> children = parent.getChildren();
- if (children.contains(childName)) {
+ DataNode existingChild = nodes.get(path);
+ if (existingChild != null) {
+ existingChild.acl = acls;
Review Comment:
I have not had a chance to play with this, but: this means we are relying on
`PrepRequestProcessor` to prevent `OpCode.create*` operations from being abused
as `OpCode.setACL`, right? (Just thinking out loud.)
--
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]