Cobresun / movie-club

🍿 Movie Club Website!
https://cobresun-movie-club.netlify.app
0 stars 1 forks source link

Database transcactions #169

Open cole-adams opened 4 months ago

cole-adams commented 4 months ago

There has been a couple weird behaviours pop up where the list service attempts to insert a work that doesn't exist. I suspect this is due to a race condition where the work is getting deleted in between the service fetching the id and inserting into the work_list_item table.

To properly fix this, we should adjust our repository architecture to support database transactions. As an interim solution, on the frontend we will avoid removing from and adding to a different list at the same time.