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

Explanation of the entries in grastate.dat file

mmikemmike EntrantCurrent User Role Beginner
Hello.

I'm trying to understand the entries in grastate.dat file, particularly seqno value. If I understand correctly, the 'seqno' value increases as node gets written to. If all nodes are shut down I can use 'seqno' to figure out which node was last written to - it is the one which has the highest 'seqno' value.

Now, am I correct in assuming that in the working (not degraded) cluster all the seqno values should be the same? That is, if I stop the writes completely, then shut down all the units, the seqno values across the cluster should be the same? (Which, in turn, means that I can safely boostrap from any pxc node?)

What also confuses me are values of '0' and '-1' for the seqno. I'm imagining that -1 corresponds to an error of some kind. But, when I bootstrap off the note which has '-1' as a seqno, and then shut it down, the seqno won't change - how am I to determine, then, if the node has failed?
What does seqno value of '0' represents? I was under impression that '0' means that there were no writes to the cluster since the bootstrap, but that seems to be in contradiction with '-1' described above.

Lastly, when is grastate.dat file created, when it gets written to, and is it ever removed by the pxc?
Mario
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.