Mysql – Read after write in Galera

galeraMySQL

I am facing a issue with 3 node galera cluster where the read doesn't return any records even when the write has been commited. Below are the steps which can happen from multiple servers.

1>Server A writes a record at 12:00:00 AM

2>Server B reads the same record after 10 seconds at 12:00:10 AM but doesn't get any record.

The bin log on all 3 server confirms the commit at 12:00:00 AM.

What could be the issue here ?

Best Answer

If you are reading from a node other than then node where the transaction was commit, there is a finite response time on the other nodes from the time it is certified, to the time it is applied on the other node.

In theory you should be able to wait to ensure its committed.