Skip to content
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-719: Fix orSetData for parallel create calls #510

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HoustonPutman
Copy link

@HoustonPutman HoustonPutman commented Dec 4, 2024

https://issues.apache.org/jira/browse/CURATOR-719

This fix really just lets the catch (KeeperException.NodeExistsException e) clause catch exceptions thrown in the if (createParentsIfNeeded) clause. Previously, since the two catch statements were for the same try, the KeeperException.NodeExistsException logic would not be called if that error was thrown when creating the node after creating the parents. This case can easily be seen when trying to call create.orSetData() in parallel on the same node, while creating parents if needed. This is because the NoNodeException would be thrown for both parallel calls, but only one would be able to create the new node in the catch statement, and the other would get an un-catchable NodeExistsException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant