[web2py] Re: update_or_insert -- I end up with duplicates

2017-10-08 Thread pbreit
I'm surprised this would be a problem unless you have a very high traffic service or there's something else going on with your code. If it really is a problem, another option you could consider is a new column with enforced uniqueness that stores some sort of mashup of the two fields ( as simpl

[web2py] Re: update_or_insert -- I end up with duplicates

2017-10-04 Thread Anthony
update_or_insert first selects the record (if it exists) and then does the create/update. I suppose when two requests come in very close to each other, the second request is checking for the record before the first request has had a chance to commit the insert. I'm not sure I would call that a