Bharath
Bharath

Reputation: 21

Deadlock Encountered when using pt-online-schema-change

I am running pt-online-schema-change, creating an index on a column in that table.

pt-online-schema-change D=pt_osc,t=pt_osc_Test,h=abcd-test.com,u=pt-osc --ask-pass --alter 'add index idx_CREATED_DATE(CREATED_DATE)' --alter-foreign-keys-method=auto --chunk-size=5k --progress time,30 --recursion-method=none --execute

Parallelly I am executing write slap test 100 insert queries 100 times with for loop script.

/usr/bin/mysqlslap -upt-osc -p -P3306 -hsabcd-test.com --concurrency=1 --iterations= --create-schema=pt_osc --query="insert into pt_osc_Test(ID,P_ID,CREATED_BY,status) values(98765,1143,'pt_osc','writetesting')" --number-of-queries=100

In this scenario, we are getting frequent deadlocks first 2 to 4 min after that writes executing normally.                                                  

Any idea or suggestions in this case

pt-online-schema-change version : 3.0.11
Mysql version : 5.7.25
Environment : AWS RDS

Upvotes: 1

Views: 341

Answers (0)

Related Questions