Odp: Re: Re: get_or_create can still cause IntegrityError

2011-05-17 Thread Tomasz Zielinski
There's a related, ongoing discussion here: http://code.djangoproject.com/ticket/13906 It looks like the general attitude is that MySQL backend should switch to READ COMMITED isolation level, which would be the simplest solution. Tomasz -- You received this message because you are subscribed t

Odp: Re: Re: get_or_create can still cause IntegrityError

2011-05-11 Thread Tomasz Zielinski
W dniu poniedziałek, 9 maja 2011, 19:05:17 UTC+2 użytkownik SleepyCal napisał: > > Hi guys, > > I spent literally *months* trying to find the best way to resolve this > situation. (...) > Have you checked my StackOverflow answer I linked in the top post? It *completely* removes the problem for

Re: Re: get_or_create can still cause IntegrityError

2011-05-09 Thread Cal Leeming [Simplicity Media Ltd]
Hi guys, I spent literally *months* trying to find the best way to resolve this situation. On our high performance sites + backends (around 120qps, 50/50 split between read and write) we were getting IntegrityError raised by get_or_create (which we now refer to as Object Collisions). We are able

Odp: Re: get_or_create can still cause IntegrityError

2011-05-08 Thread Tomasz Zielinski
W dniu sobota, 7 maja 2011, 20:03:40 UTC+2 użytkownik David Cramer napisał: > > Would it help (in PG-world) at least if the selects where in > savepoints as well? > In case you asked me - I don't know, I don't use PG on a daily basis... Anyway, let me list some possible solutions to launch the

Re: get_or_create can still cause IntegrityError

2011-05-07 Thread David Cramer
Would it help (in PG-world) at least if the selects where in savepoints as well? On May 7, 10:09 am, David Cramer wrote: > We hit this same issue in Postgres (it's definitely not MySQL > specific). I'm unsure of the solution or precise conditions we're > hitting it in, but I think by default we u

Re: get_or_create can still cause IntegrityError

2011-05-07 Thread David Cramer
We hit this same issue in Postgres (it's definitely not MySQL specific). I'm unsure of the solution or precise conditions we're hitting it in, but I think by default we use READ COMMITTED. On May 7, 3:28 am, Tomasz Zielinski wrote: > I think that get_or_create is still broken, despite this > fix

get_or_create can still cause IntegrityError

2011-05-07 Thread Tomasz Zielinski
I think that get_or_create is still broken, despite this fix: http://code.djangoproject.com/ticket/6641 The details, along with a working solution, are in my answer here: http://stackoverflow.com/questions/2235318/how-do-i-deal-with-this-race-condition-in-django/2235624#2235624 I'm not sure if t