#30601: Extend documentation about transaction rollbacks to mention global state
mutations such as caching
--------------------------------------+------------------------------------
Reporter: sebastian-philipp | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Simon Charette):
* component: Database layer (models, ORM) => Documentation
* needs_docs: 0 => 1
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
I'm not sure how related to `ATOMIC_REQUEST` this issue actually is, it
seems like a common pitfall of mixing database transactions and caching
and a good reason to rely on `transaction.on_commit` to defer cache
alterations instead.
The `atomic` documentation already mentions that model state should be
reverted (#28479) so maybe we could adjust this block to mention that all
form of state, including global one such as caching, should be reverted
and that using `transaction.on_commit` can be used to deal with global
state alterations.
Tentatively accepting based on the premise you might be interested in
submitting a patch yourself.
--
Ticket URL: <https://code.djangoproject.com/ticket/30601#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 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/075.f72663b8c9069d7de4df34c1056c2d21%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.