I have a Django project which uses a MySQL v5.5 backend with InnoDB storage.
To avoid race condition updates in DB, I'm using select_for_update to lock the rows.
Now if this lock stays for a long time, any queries on the locked rows will timeout.
I want to avoid this with one of the following options:
SKIP LOCKED
option.NOWAIT
option.How do I perform any of these with Django ORM?
from Django docs:
You can also ignore locked rows by using select_for_update(skip_locked=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With