#20571: Using savepoints within transaction.atomic() can result in the entire
transaction being incorrectly and silently rolled back
---------------------------------+---------------------------------------
Reporter: lamby | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.6-alpha-1
Severity: Release blocker | 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 akaariai):
I see. But isn't this a problem in current Django code, too:
{{{
with transaction.atomic():
try:
User.objects.create(pk=user.pk) # exception marks connection
needing rollback
except Exception:
with transaction.atomic():
# do something that raises exception
# exception marks needs_rollback = False
# Whoops, the outer block is marked clean!
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20571#comment:6>
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/063.815fce959a74413fc40bc75bc9e0d9f4%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.