I'm running ddl changes on 130GB table using pt-online-schema-change. I didn't make the ddl changes and cancelled in between. Then , I googled about the error I got and after that tried with another recommended method. Next time, I tried with specifying option : --critical-load="Threads_running=200"-. But, even after that , at this time also it cancelled with error:
Pausing because Threads_running=102.
(in cleanup) 2021-05-14T14:21:03 Error copying rows from `mydb`.customer to
`mydb`.`_customer_new`: Threads_running=203 exceeds its critical threshold 200
2021-05-14T14:21:03 Error copying rows from `mydb`.`customer` to `mydb`.`_customer_new`:
Threads_running=203 exceeds its critical threshold 200
how many maximum number of threads I can specify? Also, how I can estimate in advance how many maximum number of threads this operation will need in advance?So that, from the next time - I'll specify the correct number of threads.
I have also though of creating index with shared lock option - but it's not recommended for the replication env as per mysql documentation.