#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):

 Replying to [comment:33 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.

 Update: I'm having a heck of a time nailing down exactly what's going on
 with this hang issue.  It reliably occurs when using the oracle backend,
 but outside of Django I can't reproduce it at all; the connection does get
 properly cleaned up when the deadlocked thread exits.  About the only
 thing I've managed to determine is that if I run {{{del
 connection.connection}}} when exiting the test threads, then the issue
 does not occur and the tests pass.  What I can't figure out is why this is
 necessary.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2705#comment:38>
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