ZOOKEEPER-4846 Failure to reload database due to missing ACL - #2222
Merged
Conversation
Contributor
Author
ztzg
self-requested a review
February 11, 2025 05:54
ztzg
approved these changes
Feb 11, 2025
| if (children.contains(childName)) { | ||
| DataNode existingChild = nodes.get(path); | ||
| if (existingChild != null) { | ||
| existingChild.acl = acls; |
Contributor
There was a problem hiding this 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.)
Contributor
Author
There was a problem hiding this comment.
I'm not sure to be honest and not sure if I understand your question.
asfgit
pushed a commit
that referenced
this pull request
Feb 11, 2025
ZOOKEEPER-4846. Fix ACL reference on existing znode when trying to create Reviewers: cnauroth, eolivelli, ztzg Author: anmolnar Closes #2222 from anmolnar/ZOOKEEPER-4846 (cherry picked from commit 8532163) Signed-off-by: Andor Molnar <andor@apache.org>
asfgit
pushed a commit
that referenced
this pull request
Feb 11, 2025
ZOOKEEPER-4846. Fix ACL reference on existing znode when trying to create Reviewers: cnauroth, eolivelli, ztzg Author: anmolnar Closes #2222 from anmolnar/ZOOKEEPER-4846 (cherry picked from commit 8532163) Signed-off-by: Andor Molnar <andor@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the scenario when ZooKeeper restore from fuzzy snapshot, there's possibility that we have a znode in the snapshot, but the attached ACL is missing from the ACL cache. In this case ZK will fast forward to znode's createTxn and replays it. While we skip re-creating the existing znode, we have a chance to fix the potentially wrong ACL reference.