#19707: TransactionMiddleware leaks transaction state
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:  fixed
     Severity:  Release blocker      |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by akaariai):

 I think I will be fine with doing the same for 1.5, too. It wouldn't be a
 bad idea to do a bigger cleanup to transaction management in 1.6, there
 are also other problems in the tx management code (see for example the
 _dirty flag handling...). Of course, 1.6 changes depend on available
 developer time.

 I haven't tested broken connections before, and it seems 500.html wont
 save you when dealing with broken connections. And, it is somewhat easy to
 have unbalanced enter/leave tx calls, for example it is possible some
 middlewares are skipped if another middleware raises an exception. And an
 exception from middleware is somewhat likely in case db connections do not
 work...

 So, the current plan: remove the try-except from the request_finished
 signal for 1.4 and 1.5, adjust tests as needed. The connection state wont
 be guaranteed to be cleaned immediately after badly failed requests, but
 it will be cleaned eventually.

 Even with this adjustment I am afraid this ticket has still some potential
 for regressions in testing conditions.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19707#comment:17>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to