On Sunday 08 March 2009, Malcolm Tredinnick wrote: > On Sat, 2009-03-07 at 21:24 +0200, Shai Berger wrote: > > Hi list, Malcolm, > > > > If I start working on a patch for #9664 (Transaction middleware closes > > the transaction only when it's marked as dirty; marked for milestone > > 1.1), will I be duplicating effort? > > > > Have you read Jeremy's latest comment on the ticket?
In fact, before I sent my earlier mail to the list I hadn't. I spent some time over the weekend looking at svn and web-searched for this ticket, and managed to miss the ticket itself. But... > That indicates what > the next step is: some sensible timing runs to work out the effect of > removing the "dirty" flag. > ...I've added some preliminary results to the ticket now. > Either solution to this problem is fairly acceptable at the moment (sans > timing information): we either essentially get rid of the "dirty" > concept and always commit or always rollback (we know when to do each > one) and we point people who are heavily select-based and care about the > slight extra time and are willing to audit their code for manual > transaction safeness to use "autocommit" mode for PostgreSQL in 1.1 > (available after #3460 lands). However, that doesn't accomodate other > database backends. Alternatively, we document that if you're doing > manual SQL operations that change the transaction state, you have to > also set the dirty flag. > > At the moment I have a very slight lean towards the latter case because > it's least intrusive and most portable. To go the other route, we need > supporting evidence. Once that's in, there's really nothing to do on the > ticket: it's a three line change. > It's a three-line change, if we are willing to accept one of the choices you outlined above. I think we can make a change that is not much more complex, will make new projects start with a safer behavior (always close transactions), and will not hurt performance for existing users. Thanks for your time and attention, 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-developers@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 -~----------~----~----~----~------~----~------~--~---