#2705: [patch] Add optional FOR UPDATE clause to QuerySets
---------------------------------------------------+------------------------
          Reporter:  Hawkeye                       |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  1                             |  
---------------------------------------------------+------------------------
Comment (by ikelly):

 I made a small change to handle_deadlocks so that the transaction is
 automatically rolled back when a deadlock is detected and no retries are
 left.  The reason for this is that in Oracle, the second thread in the
 test was still waiting for the first thread to rollback even after the
 first thread had been joined and presumably had its resources cleaned up.
 The alternative would be to leave it as is and recommend the user to
 always rollback whenever a DeadlockError is raised, but I'm not thrilled
 with that: one might expect to be able to ignore the DeadlockError and
 have the deadlock be fully resolved.

 I'll also be checking on the cx_Oracle mailing list whether this behavior
 is intended.

 On a related note, I'm not sure that having handle_deadlocks retry the
 view should be the default behavior -- anything done in middleware and not
 already committed would be rolled back as well and '''not''' retried.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2705#comment:33>
Django <http://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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to