I'm working in a clustered MariaDB database with Galera and MaxScale in r/w routing.
My question is if the commit command successful return implies a completed replication or not.
This is the scenario:
- I have a php application linked to MaxScale port.
- This application inserts a record
- Then it call using REST-API a local java application passing the new record id.
- The java application is connected to the same MaxScale port, and it read the inserted record
However sometimes it looks like Java cannot find the new record just inserted.
Is it possibile that the commit is returned even if the replication is not finished and then the java cannot find the record due to replication latency?