Hi Christophe, Jacob and all,

On Saturday 23 October 2010, Christophe Pettus wrote:
> On Oct 22, 2010, at 4:01 PM, Jacob Kaplan-Moss wrote:
> > It's a bug: http://code.djangoproject.com/ticket/9964.
> > 
> > Looks like the patch there is OK, but still needs some work (there's a
> > couple of TODOs still).
> 

I was quite surprised to see that comment, in light of 
http://code.djangoproject.com/ticket/9964#comment:15 where Russell, Malcolm 
and Jacob decided that the patch's approach was unacceptable.

> Looking at the history of the ticket, it looks like there is some concern
> about keeping the "current behavior" to maintain backwards compatibility.
> 
> Which raises the question: Just what is the current behavior that we'd like
> to preserve?

The current behavior is to keep "clean" transactions open. As benchmarks I ran 
then indicated ( http://code.djangoproject.com/ticket/9964#comment:6 ), this 
may under some scenarios actually improve performance.

> The current situation seems to be quite indeterminate; the
> transaction just stays open until it is closed... somehow, by some means
> (probably a rollback when the connection closes).  

(more probably until the relevant thread handles a request which updates the 
database through the models, or otherwise dirties a transaction)

> Is this really
> explicit-enough behavior that maintaining it is important?  Are
> applications really relying on it?
> 

I would be extremely surprised if there is any application out there which 
conciously relies on it. I would be almost as surprised if the behavior is 
changed to "always close transactions" and no website starts to break 
misteriously or experience 20% slow-downs. The change is deep. This is why I 
tried to make it so that all new projects start with correct behavior, but 
upgrades under old projects will not change the behavior.

If Jacob has indeed changed his mind about the viability of this approach -- 
or if your "just do the right thing" approach is accepted -- I will be 
delighted to cooperate on updating the patches. Just please CC me with 
responses, because I tend to neglect monitoring this list.

Thanks,
        Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to