I was running a ptosc for adding an index on a table while running Ptosc i seen many deadlock errors was logging into the log when i check those are triggred by pt-osc
Can someone help me how to avoid this
mysql tables in use 2, locked 2
LOCK WAIT 7 lock struct(s), heap size 1136, 4 row lock(s), undo log entries 1
MySQL thread id 5574896, OS thread handle 47371953706752, query id 34640533083 172.31.13.123 cart-rw update
REPLACE INTO `chart`.`__________charts_new` (`id`, `userid`, `subtotal`, `shippingcharges`, `destpin`, `carrierid`, `codcharges`, `total` ,`created`, `migrationid`) VALUES (NEW.`id`, NEW.`userid`, NEW.`subtotal`, NEW.`shippingcharges`, NEW.`destpin`, NEW.`carrierid`, NEW.`total`, NEW.`created`, NEW.`m
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
TABLE LOCK table `chart`.`__________charts_new` trx id 12740293280 lock mode AUTO-INC waiting
*** (2) TRANSACTION:
TRANSACTION 12740293273, ACTIVE 1 sec inserting
mysql tables in use 2, locked 2
8 lock struct(s), heap size 1136, 5 row lock(s), undo log entries 3
MySQL thread id 5574356, OS thread handle 47431366022912, query id 34640532979 172.31.46.96 cart-rw update
REPLACE INTO `chart`.`__________charts_new` (`id`, `userid`, `subtotal`, `shippingcharges`, `destpin`, `carrierid`, `codcharges`, `total`, `created`,`migrationid` ) VALUES (NEW.`id`, NEW.`userid`, NEW.`subtotal`, NEW.`shippingcharges`, NEW.`destpin`, NEW.`carrierid`, NEW.`total`, NEW.`created`, NEW.`mi
*** (2) HOLDS THE LOCK(S):
TABLE LOCK table `chart`.`__________charts_new` trx id 12740293273 lock mode AUTO-INC
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 424 page no 18245 n bits 752 index unique_user_id of table `chart`.`__________charts_new` trx id 12740293273 lock_mode X waiting
Record lock, heap no 673 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 4; hex 89fb209c; asc ;;
1: len 4; hex c2917377; asc sw;;