#23353: TransactionManagmentError isn't helpful for tracking down cause
----------------------------------------------+--------------------
     Reporter:  mbox                          |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 The error: "TransactionManagementError: An error occurred in the current
 transaction. You can't execute queries until the end of the 'atomic'
 block." thrown from django/db/backends/__init__.py", line 372, in
 validate_no_broken_transaction doesn't provide enough information to help
 track down the problem.

 The exception is thrown if self.needs_rollback is True, but the underlying
 reason that self.needs_rollback has been set True has been lost, since it
 could have happened a long time previously.

 Transactions should keep track of why needs_rollback has been set, and use
 that to provide a more helpful error.

 Background: I'm seeing this error being thrown when a task is run on a
 Celery queue, but not when run manually. Since it's via Celery, dropping
 into the debugger is impossible, and thus I'm back to trying to dump
 useful debug info.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23353>
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/047.d5becf9a9c1ad5e3e87311f98c55d964%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to