Hi all,
I am running into 'concurrent POST requests' issue in the application that I would like to handle.
It's resulting in duplicate entries in database for columns with indexes.
I am thinking of adding unique constraint to the table columns (with index) and handle resulting database errors in the application.
Another way is to lock the row using something like
order.transaction do
order.lock!
end
end
I would like to know your thoughts about the 2 approaches.
It will be great if you could direct me to useful links.
Thank you in advance!