preaction / Minion-Backend-mysql

MySQL backend for the 🐙 Minion job runner
Other
7 stars 14 forks source link

Move DELETE command out of stored function #40

Open andrii-suse opened 1 year ago

andrii-suse commented 1 year ago

Autocommit is disabled in stored functions. So the DELETE command was holding locks until INSERT finished, Which may lead to deadlocks in concurrent environment.

andrii-suse commented 10 months ago

Can we get this going? It looks my usage of Minion-backend-mysql is the most intensive; I don't have any other explanation why nobody complains about it. I don't want to switch to postgres, but these deadlocks is one of most pressing reasons for me to do it. (And it will be simpler than forking minion code). I get few of these deadlocks daily and the process just crashes leaving bunch of abandoned jobs, which is annoying at least.