Handle race condition when creating an MR approval
Add two migrations for deleting duplicates and adding a unique index for user_id and merge_request_id on approvals table. Since this migration will run on MySQL too, a separate query needs to be implemented for it as the one for PostgreSQL doesn't work on MySQL. This will prevent creation of duplicate records in case concurrent requests try to do the same thing.
Showing
Please register or sign in to comment