Using pt-online-schema-change with percona 5.7

After trying to use the pt-online-schema-change tool to alter a table on our percona 5.7 cluster, the tool would consistently fail due to a “WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction” error.

After doing a bit of digging we found that whilst copying the data from the old data to the _new table it would get the above error (due to activity on the table) and would not retry the transaction as the error does not fall into the list of errors that the tool recognises - those errors being:
[LIST]
[]Lock wait timeout
[
]Deadlock found
[]Query is killed
[
]Connection is killed
[*]​​Lost connection to MySQL
[/LIST] I was a bit confused as it the given error seemed like something the tool should be able to retry so after a bit more digging I found the following commit for the percona-xtradb-cluster which appeared to change the tests for use with 5.7? [url]https://github.com/percona/percona-xtradb-cluster/commit/9e28f069217c91a5139fb7174d05e88a5d4a5850#diff-331f50bdc872eed70ac6715344b8ada8[/url]

ERROR 40001: Deadlock found when trying to get lock; try restarting transaction

became

ERROR 40001: WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction

Is it the case that the “Deadlock found” error message has changed and the tool hasn’t caught up with it or should I provide some more debug information about our use case?

Hi,

Could you please create an issue in Jira? https://jira.percona.com
Please include information about how to reproduce the issue.

Thanks.

Hi there! Thanks for the quick reply - as per your request I was able to replicate the issue in a dev environment and I’ve set up a jira ticket [url][PT-229] pt-online-schema-change does not retry on deadlock error when using percona 5.7 - Percona JIRA Please let me know if you need any more information or have any suggestions on what I can do to mitigate this.

Thanks!