#26630: Defered constraint checks flush after `post_delete` signal
-------------------------------------+-------------------------------------
Reporter: Alex Madjar | Owner: (none)
Type: Bug | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):
Thanks, Annabelle, I'm seeing the same. However, I think this is a symptom
of the test project needing to be updated. If you connect a `post_delete`
signal on `Choice` as well, you can undo the effect of the optimization
from #30856 and trigger the failing code path again.
[https://dryorm.xterm.info/cascade-deletions-post_delete-signal-
interaction Here is a fiddle on DryORM]
I'm not sure exactly how to fix this, but we should probably examine the
solution space a bit more before closing this one.
If you're curious how I dug around for this, I noticed the original report
suggesting that one of the objects was not being cascade deleted, but as
you saw, it was. So I set a breakpoint and noticed we were hitting a "fast
delete" path, which led me to #30856 driving more traffic into that path.
--
Ticket URL: <https://code.djangoproject.com/ticket/26630#comment:9>
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/0107019b9eebea4c-f8315c00-b601-421e-9d8f-a396b14aeaf7-000000%40eu-central-1.amazonses.com.