#29499: Race condition in QuerySet.update_or_create()
-------------------------------------+-------------------------------------
Reporter: Michael Sanders | Owner: Michael
| Sanders
Type: Bug | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: race-condition | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Graham <timograham@…>):
In [changeset:"4441826026c888a479d5262d47fbbd72a689efa8" 44418260]:
{{{
#!CommitTicketReference repository=""
revision="4441826026c888a479d5262d47fbbd72a689efa8"
[2.0.x] Fixed #29499 -- Fixed race condition in
QuerySet.update_or_create().
A race condition happened when the object didn't already exist and
another process/thread created the object before update_or_create()
did and then attempted to update the object, also before
update_or_create()
saved the object. The update by the other process/thread could be lost.
Backport of 271542dad1686c438f658aa6220982495db09797 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29499#comment:10>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.7bc2eacaa6bd0114154aea42f519a56f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.