#21670: New Model.save() mechanism causes deadlocks in mysql transactions
-------------------------------------+-------------------------------------
     Reporter:  err                  |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.6
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by vldmit):

 This affects models with multi-table inheritance, as child model's primary
 key is not auto incremented. Concurrent insert lead to deadlocks.

 `select_on_save = True` in model's solve the problem. I believe this
 option needs to be enabled for multi-table inheritance models, as inserts
 are not guaranteed without it (at least when using MySQL).

--
Ticket URL: <https://code.djangoproject.com/ticket/21670#comment:4>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.765dc6e809d9241a7d9a681160a37683%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to