Hi,
We are started facing deadlock issue very frequently after upgrading to 5.7
There are no changes in application and application was running fine before upgrade.
Version: | 5.7.25-28-log |
Latest Deadlock from innodb status:
LATEST DETECTED DEADLOCK
2019-06-20 10:49:01 0x7fd7d7919700
[LIST]
[]
[LIST]
[]
[LIST]
* TRANSACTION:
TRANSACTION 76157437744, ACTIVE 0 sec inserting
mysql tables in use 1, locked 1
LOCK WAIT 3 lock struct(s), heap size 1136, 2 row lock(s), undo log entries 1
MySQL thread id 5999151, OS thread handle 140565033457408, query id 1157758472 10.72.30.174 morpheus_write update
INSERT INTO targets
(campaignid
, targetkey
, priority
, destination
, status
, nextattempt
) VALUES (‘166369’, ‘RT-API-1560991741.5838-5d0ad7fd8e968’, 1, ‘0452162373’, ‘READY’, NULL) ON DUPLICATE KEY UPDATE targetid
= LAST_INSERT_ID(targetid
), destination
= VALUES(destination
)
* WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 210 page no 7923783 n bits 144 index campaignid of table morpheus
.targets
trx id 76157437744 lock_mode X locks gap before rec insert intention waiting
* TRANSACTION:
TRANSACTION 76157437737, ACTIVE 0 sec inserting
mysql tables in use 1, locked 1
4 lock struct(s), heap size 1136, 3 row lock(s), undo log entries 1
MySQL thread id 5999154, OS thread handle 140565011339008, query id 1157758444 10.72.30.174 morpheus_write update
INSERT INTO targets
(campaignid
, targetkey
, priority
, destination
, status
, nextattempt
) VALUES (‘166369’, ‘RT-API-1560991741.5748-5d0ad7fd8c59b’, 1, ‘0447272344’, ‘READY’, NULL) ON DUPLICATE KEY UPDATE targetid
= LAST_INSERT_ID(targetid
), destination
= VALUES(destination
)
* HOLDS THE LOCK(S):
RECORD LOCKS space id 210 page no 7923783 n bits 144 index campaignid of table morpheus
.targets
trx id 76157437737 lock_mode X locks gap before rec
* WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 210 page no 7923783 n bits 144 index campaignid of table morpheus
.targets
trx id 76157437737 lock_mode X locks gap before rec insert intention waiting
[*]WE ROLL BACK TRANSACTION (1)
------------
[/LIST]
[/LIST]
[/LIST]