Deadlocks in Mariadb
A deadlock is effectively two concurrency transactions updating the same data. This need to be handled at application level because there's no obvious solution that always works without accounting for the business case.