MySQL Forums
Forum List  »  InnoDB

Re: mysql 5.6.26 high concurrency dead lock
Posted by: Peter Brawley
Date: May 31, 2019 12:02PM

> (`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.

Options: ReplyQuote


Subject
Views
Written By
Posted
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.