Re: mysql 5.6.26 high concurrency dead lock
> (`code`,`data_key`,`create_time`) is unique key,is to prevent data duplication.
Yes, therefore the ( code ) key is redundant.
> What lock does transaction 1 hold?
> Why transaction 2 is waiting for transaction 1 ?
Perhaps someone more familiar with innodb innards can answer that.
What you must realise, though, is that such deadlocks are inevitable on a busy system. To minimise their impact (i) keep transactions small & simple, (ii) code transactions to retry when deadlock occurs.
Subject
Views
Written By
Posted
1008
May 30, 2019 08:41PM
Re: mysql 5.6.26 high concurrency dead lock
649
May 31, 2019 12:02PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.