I will keep scraeming "rescuing RecordNotUnique can deadlock mysql" at your house
-
Show this thread
-
like, if you have code that does: begin Foo.create(name: x, ...) rescue RecordNotUnique Foo.where(name: x).update(...) end this can deadlock mysql as soon as someone double-submits a form fast enough
3 replies 1 retweet 2 likesShow this thread -
so - the client-side uniqueness validation and find_or_create don't work - the recommended way based on unique indexes doesn't work either
1 reply 0 retweets 0 likesShow this thread -
I think this is due to a mysql bug, not rails, but it does mean rails needs a dedicated API for the mysql equivalent of UPSERT
4 replies 0 retweets 0 likesShow this thread
Replying to @mountain_ghosts
The semantics are wildly different enough between backends that it'd be weird for Rails to try to abstract over it.
2:08 PM - 20 May 2019
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.