Fix race condition in available-prefix/ip APIs

Implement advisory lock to prevent duplicate records being inserted
when making simultaneous calls. Fixes #2519
This commit is contained in:
Matt Olenik
2019-12-13 11:52:59 -08:00
parent de5aa85f53
commit 7acda4fa37
4 changed files with 26 additions and 0 deletions

View File

@@ -22,6 +22,10 @@ django-filter
# https://github.com/django-mptt/django-mptt
django-mptt
# Context managers for PostgreSQL advisory locks
# https://github.com/Xof/django-pglocks
django-pglocks
# Prometheus metrics library for Django
# https://github.com/korfuri/django-prometheus
django-prometheus