#9964: Transaction middleware closes the transaction only when it's marked as
dirty
---------------------------------------------------+------------------------
          Reporter:  ishirav                       |         Owner:  
mtredinnick 
            Status:  assigned                      |     Milestone:  1.3        
 
         Component:  Database layer (models, ORM)  |       Version:  1.0-beta-1 
 
        Resolution:                                |      Keywords:  
transactions
             Stage:  Accepted                      |     Has_patch:  1          
 
        Needs_docs:  0                             |   Needs_tests:  0          
 
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by shai):

 Hi Jacob,

 Thanks for your attention and comments. I'll make some fixes later today
 or through the weekend, but there's just one thing I'd like to have
 feedback for before I do: As I've noted, while the backend cursors are
 being wrapped, they are each being wrapped completely separately. I don't
 see a way for correct behavior without being notified of cursor activity.
 So the alternatives I see are:

 - A wrapper as in the patch
 - A (essentially duplicate) fix in every cursor-wrapper
 - A mixin (equivalently, metaclass, or class decorator, 2.4
 notwithstanding) that cursor wrappers will now be required to inherit;
 still requires the fix in every cursor-wrapper (including those, like
 MSSQL, which are not in the Django code base).

 Of these, I think the wrapper is the simplest in terms of code complexity
 and managability. In terms of performance, since we're talking about I/O,
 I think the overhead should be acceptable.

 What am I missing?

 Thanks again,
    Shai.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9964#comment:44>
Django <http://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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to