#9581: Race condition in Model.save() with non-automatic unique indexes
------------------------------------------+---------------------------------
 Reporter:  [EMAIL PROTECTED]              |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.0       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 The current Model.save() implementation transparently handles updating of
 records vs. insertion of new records.
 It first tries to update an existing record and if it fails it will do an
 insert instead.

 This can lead to a race condition when between the failed update and the
 subsequent insert another process successfully inserts an object with the
 same primary key (or other field with unique index). For automatically
 generated primary keys (e.g. auto-inc IDs) this is not a problem. But for
 manually-set PKs (or other unique fields) this will lead to a key
 integrity violation.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9581>
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to