Racing condition with pre_delete

11 views
Skip to first unread message

Sebastian Haase

unread,
Apr 25, 2021, 1:00:13 PM4/25/21
to Django users
I often run into a bug when the client triggers multiple http requests resulting each in a delete.
My objects have a „sibling index“ field, where I use pre_delete to update all siblings „above“ to lower their index by 1 (using update with an F-expression).
Any idea why this would not work reliably? I use Postgres as db-backend.
Thx, Sebastian.

Reply all
Reply to author
Forward
0 new messages