Sunday, April 25, 2021

Racing condition with pre_delete

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.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fb39c2d8-a89d-4e4e-986a-081805b96d1fn%40googlegroups.com.

No comments:

Post a Comment