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

user_profile.py create operation is not atomic #2058

Open
mikesmit opened this issue Dec 17, 2024 · 0 comments
Open

user_profile.py create operation is not atomic #2058

mikesmit opened this issue Dec 17, 2024 · 0 comments
Assignees

Comments

@mikesmit
Copy link
Collaborator

https://github.com/PolicyEngine/policyengine-api/blob/master/policyengine_api/endpoints/user_profile.py#L19-L57

  1. Does a select to see if a user already exists and then
  2. Does an insert if not.

This is not atomic so if I call it twice quickly I can get intermittently different behavior.

I am creating this issue to track the problem and come back to fix it later after addressing #1989

@mikesmit mikesmit self-assigned this Dec 17, 2024
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

No branches or pull requests

1 participant