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

  * needs_better_patch:  1 => 0
  * needs_docs:  1 => 0

Comment:

 I've updated the patch. Key changes:

     * I've removed all the attempts to detect deadlock, retry
 transactions, and associated documentation. I've done this for two
 reasons:
       * It keeps this patch much more focussed: it now *only* introduces
 select_for_update, and does nothing else. Django apps may suffer from
 deadlock without this patch anyway - there doesn't seem much point in
 trying to shoehorn a general solution into this patch in particular.
       * Reading the comments in `django.db.utils`, the intent is for
 database-related exceptions to mirror what's in PEP249. The closest
 exception in PEP249 is simply DatabaseError, which is raised already.
     * Executing a `select_for_update` now sets the transaction to be
 dirty. This is done at the point the query is run, not at the point that
 `select_for_update` is actually called.
     * Tests that require threading support should now be skipped on
 platforms that do not support threading.
     * Minor doc cleanups

 Tests pass on SQLite, PostgreSQL and MySQL. I'd appreciate it if someone
 with access to Oracle could give them a shot, as my attempts to get Oracle
 up and running failed.

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