Not the answer you need?
Register and ask your own question!

tool for checking data consistency for PXC

split-brainsplit-brain EntrantCurrent User Role Contributor
edited July 21 in Other MySQL® Questions
Hi there!
I'm looking for some tool, which will be helpful for testing write data consistency in case of a node crash.
The scenario: 3 node PXC cluster governed by proxysql configured for r/w split with a backup writer node. The tool would feed the proxysql with data and in case of simulated crash of the writer node, proxysql will then redirect the connection to the new writer. Tool would then check, if the dataset was correctly written to the cluster.
Is there some tool, that can be used for this?

Many thanks

Answers

  • DGBDGB Percona Staff Role
    Hi, by design PXC guarantees data consistency, if properly used and configured with safes like pxc_strict_mode enabled. Now, pt-table-checksum can be used for check data consistency (see: https://www.percona.com/doc/percona-toolkit/LATEST/pt-table-checksum.html#percona-xtradb-cluster )
    More on data consistency for PXC: https://github.com/nethalo/pxc-break-fix-lab/blob/master/docs/Data_Consistency.md
  • split-brainsplit-brain Entrant Current User Role Contributor
    Hi DGB, thanks for reply!
    I'm sorry I should have formulated the question better. My concern here isn't to compare data among nodes for differences, but rather to test what happens, when the writer node dies during the different stages of  processing the query. Also I would like to set up proxysql to be able to gracefully reroute the client connection to backup writer node. I need to know how to properly handle db calls in case of dropped connection, timeouts etc. I'm using sysbench, but would rather use some other tool that will allow me to see which queries were successful and some error codes in cases, where for some reason they failed.


  • DGBDGB Percona Staff Role
    At the end, everything is classic InnoDB so it works the same regardless of Galera or not been used. 
    Now, to setup ProxySQL along with PXC here's a handy tutorial on how to do it: https://www.percona.com/doc/percona-xtradb-cluster/LATEST/howtos/proxysql.html

  • split-brainsplit-brain Entrant Current User Role Contributor
    I have followed this tutorial as well as many others, regarding the integration of PXC with ProxySQL. Still I'm failing to prove, that proxysql is capable of handling the client connection in case of backend node failure. Everytime I do grateful shutdown, mark node as 'OFFLINE_SOFT' or kill the mysqld process, I sysbench get disconnected with error 1213, or 2013.
    I'm stuck at the point, where I can't deploy PXC + proxysql, because its dropping connections in case of node failure.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.