Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition in version slug generation (#133)
The previous use of `select_for_update` fell out of scope too quickly and caused the lock on the database to be removed too quickly. This potentially allowed a race condition if, for example, a user hit the "Create new version" button too many times and the queries were evaluated at the same time. It is possible that this caused the duplicate slug issue that we've observed before, in some cases.
- Loading branch information