#36489: OneToOneField + concurrent get_or_create results in wrong object in
field
cache
-------------------------------------+-------------------------------------
Reporter: Brian Atkinson | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Brian Atkinson):
> Also I don't think the update_or_create call is necessary, we can stick
to two get_or_create I think?
You are correct, I missed cleaning that up from an earlier iteration of
building the test case. We'd initially seen it with two racing
`update_or_create`, but upon investigation it is possible with just the
underlying `get_or_create`. I'm happy to update the example in the initial
report with that cleanup if that would be helpful.
Thank you for taking the time to look into this.
--
Ticket URL: <https://code.djangoproject.com/ticket/36489#comment:3>
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/01070197c79198a0-e22a01a7-b341-4e17-810f-b63a32f753dc-000000%40eu-central-1.amazonses.com.