#13105: [patch] get or create thread safety
-------------------------------------------------------+--------------------
 Reporter:  toplex                                     |       Owner:  toplex   
 
   Status:  new                                        |   Milestone:           
 
Component:  Database layer (models, ORM)               |     Version:  1.1      
 
 Keywords:  thread;multithread;relation;get_or_create  |       Stage:  
Unreviewed
Has_patch:  1                                          |  
-------------------------------------------------------+--------------------
 If you try get_or_create from several threads at the same time, you'll get
 duplicates sooner or later. Same goes for adding relations (which checks
 for duplicates on it's own).
 This is a small patch to fix it using a Lock mechanism.
 Obviously it won't work when tried from several processes, so I would call
 it an intermediate patch.
 This is my first time touching Django code, so I'm sorry for any screw
 ups.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13105>
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