How does the gcache size work in Galera?

How does the gcache size work in Galera?

The gcache size defines how many writesets the donor node can serve in IST. By default, Galera creates gcache file under MySQL datadir. One might think that gcache is similar to MySQL binlog but it is not actually true, as explained in details on the Galera FAQ. IST is always the preferred choice when joining a node to a cluster.

Is there a way to recover the Galera cache?

This option to retain the galera-cache is controlled by an option named gcache.recover=yes/no. The default is NO (Galera cache is not retained). The user can set this option for all nodes, or selective nodes, based on disk usage. The example below demonstrates how to use this option:

How big is a gcache page on disk?

Let’s say gcache.page_size=1M and transaction write_set = 1.5M, then a separate page (in turn on-disk file) will be created with a size of 1.5M. How long are on demand pages retained? This is controlled using following two variables:

How does Galera cache work in Percona XtraDB?

Percona XtraDB Cluster is a multi-master topology, where a transaction executed on one node is replicated on another node (s) of the cluster. This transaction is then copied over from the group channel to Galera-Cache followed by apply action.

Why is node a gracefully stopped in Galera?

Node A is gracefully stopped. Likely for the purpose of maintenance, configuration change, etc. In this case the other nodes receive “good bye” message from that node, hence the cluster size is reduced and some properties like quorum calculation or auto increment are automatically changed.

Why did MySQL Cluster go down in Galera?

All nodes went down without proper shutdown procedure. Such situation may happen in case of datacenter power failure, hitting some MySQL or Galera bug leading to crash on all nodes, but also as a result of data consistency being compromised where cluster detects that each node has different data.

Why does Galera say failed to copy datafile?

[01] xtrabackup: Error: failed to copy datafile. This time it’s much more clear – we have an error in xtrabackup_copy_datafile () function which, as you may expect, is responsible for copying files. This leads us to the conclusion that some kind of network connection issue happened between donor and joiner.