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? > > The solution I would propose is, essentially, a removal of the clean/dirty > concept from transactions; in the current django.db.transaction's terms, > considering all transactions dirty at all times. For all I can see, the only > purpose served by the dirty flag is preventing some open transactions from > closing properly, which is essentially the problem in the ticket.
Have you read Jeremy's latest comment on the ticket? That indicates what the next step is: some sensible timing runs to work out the effect of removing the "dirty" flag. 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. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---