#32590: Add option to avoid subtransactions by default when using
transaction.atomic()
-------------------------------------+-------------------------------------
     Reporter:  Alex Rattray         |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Adam Johnson):

 >  In https://code.djangoproject.com/ticket/32220, an option for a given
 call is provided to throw if nested, but some users may want this to be
 enabled by default for all calls – or to simply be a no-op when nested –
 to avoid the performance cliff mentioned in the above piece (and other
 cursed aspects of subtransactions).

 Such users can create their own alias:

 {{{
 atomic = functools.partial(atomic, durable=True)
 }}}

 I think adding any kind of setting to activate this globally would be
 harmful as it could break third party app code using transactions.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32590#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.b14531436412fa5d03caec74fa902e3e%40djangoproject.com.

Reply via email to