ypercubeᵀᴹ: When you delete a row you need to delete the reference to the row in all secondary indexes. Both transactions want to delete the row with name = 'lg4xdzvn2bth'
name = 'lg4xdzvn2bth' and age=99
age=99.
Tran 2 was second to request that so it was waiting. But now Tran 1 wants to delete all the rows with name = 'lg4xdzvn2bth'
name = 'lg4xdzvn2bth' as well, which tran 2 has already locks on.
So they are both waiting on each other locks. Deadlock.