Data replication


I would like to ask about data replication on the node that has been re-joined to the cluster after failure. What happens if someone queries a table that hasn’t yet been synced? Will they get old stale data, or does the cluster wait until it is in sync before replying? Essentially, is it possible to get inconsistent results from different nodes?


The node will reject all commands except SHOW/SET until it catches up with the cluster.

However even when the node is in the SYNCED state, if you try hard enough you can still read stale data. To avoid that you can set wsrep_causal_reads session variable, it will guarantee that the client read will happen after all writes that it saw at the cost of some additional latency. CAUTION: you should set it only per session!