Handling deadlock in MariaDB Galera Cluster

Recently I was working on a data migration script. There was a requirement to migrate data from one database to another; from one schema to another on a daily basis. Though the script was successfully running in development server but in production it was continuously failing for a query with deadlock error.
Continue reading