On Mon, 2008-09-29 at 03:25 -0700, Richard Davies wrote: [...] > So, do we agree that it makes sense for me to take the current 3460 > patch and complete it in the manner which I described in > http://groups.google.com/group/django-developers/msg/48500109ac5e514d > ?
I'd be amazed (and fairly disappointed) if two copies of the code in transaction.py was required. I'm fairly sure it can all be done by examining the current transaction handling state inside existing methods. But give it a shot however you like. As usual with patches, no guarantees apply beforehand as to whether they'll be committed or not because we often/usually have to look at an implementation before knowing if it's going to work long-term. However, if I was doing this (and if no reasonable alternative pops up in the next couple of months I probably will), I'd be trying very hard to avoid any code duplication at all. I realise it sounds fuzzy to say "my intuition says", but it looks like it should be possible to do checks for whether we're in auto-commit mode or not and have all the existing calls just behave normally -- including allowing manual transaction starts regardless of the mode. The implementation here will probably turn out to be easy. The design will be the hard bit. Regards, Malcolm > I'd particularly like Malcolm to confirm if my description there > matches his discussion with Collin. > > If we're agreed, then I'll take over ownership of that ticket from > Collin (unless you want to do it, Collin?), and I'll add 'optional > native autocommit' to the Django 1.1 features list. > > Cheers, > > Richard. > > ---- > > One technical point: > > When I started writing in this thread, I hadn't appreciated that > rollback() and rollback_unless_managed() are used by Django outside > explicit user-started transaction management in order to attempt to > keep things consistent after failures. How do people think that we > should handle these when 'native autocommit' is on? The options seem > to be: > a) Make them no-ops and accept the failures > b) Work out which points they roll back to, and add explicit 'BEGINs' > at those points > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
