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

12336 make region API calls atomic #13942

Merged
merged 7 commits into from
Oct 17, 2023
Merged

Conversation

arthanson
Copy link
Collaborator

@arthanson arthanson commented Oct 2, 2023

Fixes: #12336

added mixin to put pglocks (for MPTT) around view calls to create, update, destroy. used the model name for the lock key (instead of a common 'mptt' one) so parallel calls could be made to different mptt objects (say sitegroups and regions) for better performance.

@arthanson arthanson marked this pull request as ready for review October 12, 2023 19:53
@arthanson arthanson changed the title DRAFT: 12336 make region API calls atomic 12336 make region API calls atomic Oct 12, 2023
netbox/netbox/api/viewsets/__init__.py Outdated Show resolved Hide resolved
netbox/netbox/api/viewsets/__init__.py Outdated Show resolved Hide resolved
netbox/netbox/constants.py Outdated Show resolved Hide resolved
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @arthanson!

@jeremystretch jeremystretch merged commit d77d45e into develop Oct 17, 2023
8 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
@arthanson arthanson deleted the 12336-serialize-region-api branch April 18, 2024 15:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel Region Create API calls can produce top-level regions with the same tree_id
2 participants