#36915: Add support for select_for_update for implicit transactions
-------------------------------------+-------------------------------------
Reporter: David | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by jaffar Khan):
I think select_for_update() is working as it has to be because using
select_for_update() in implicit transactions will not make sense as no
atomic boundary is defined, django will not know when to lock the rows and
when to release the lock. It is defined in docs
[https://docs.djangoproject.com/en/6.0/ref/models/querysets/#select-for-
update] as
**Returns a queryset that will lock rows until the end of the
transaction**
Even if you redefine the select_for_update() it will lock the rows and
immidiatley release it before any updates so technically it will behave as
implicit transactions.
--
Ticket URL: <https://code.djangoproject.com/ticket/36915#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019c47a4ee9d-e4a1ba09-a7f2-47f5-94d1-a1492955f699-000000%40eu-central-1.amazonses.com.