[MXS-2643] Maxscale causal_reads and Mariadb percona cluster timeout Created: 2019-08-20 Updated: 2019-12-03 Resolved: 2019-12-02 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | galeramon, readwritesplit |
| Affects Version/s: | 2.3.10, 2.3.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Leon Ruumpol | Assignee: | markus makela |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
In a Mariadb cluster (4 node) with gtid mode on we have problems with causal_reads. After an insert, the next query waits until the causal_reads_timeout reaches its maximum value. We are not sure if this problem comes from Maxscale or Percona. Steps to reproduce: CREATE TABLE `test_lrl`.`test` ( SELECT id,text,@@HOSTNAME FROM test_lrl.test; INSERT INTO `test_lrl`.`test` (`text`) VALUES ('Test'); SHOW SESSION VARIABLES WHERE Variable_name = 'last_gtid'; Mariadb nodes: SHOW GLOBAL VARIABLES LIKE 'gtid_current_pos'; SELECT id,text,@@HOSTNAME FROM test_lrl.test; Mariadb nodes: Config Maxscale: ------------------ [galera-service] [NamedServerFilter] Galera cluster: wsrep_on=ON wsrep_cluster_name="mariadb-c01-test" wsrep_sst_method=mariabackup wsrep_node_address="10.1.1.162"
|
| Comments |
| Comment by markus makela [ 2019-10-16 ] | ||||
|
It's very likely that this is caused by the GTIDs in Galera. To my knowledge they are not guaranteed to be the same across all clusters and as such the causal_reads feature might not work. | ||||
| Comment by markus makela [ 2019-12-02 ] | ||||
|
Turns out this is reproducible with a direct connection to a MariaDB master:
The MASTER_GTID_WAIT seems to work correctly only when replication is configured. This would suggest that it's not a MaxScale problem and that the problem is in the server. Upon further inspection of the MASTER_GTID_WAIT documentation, the reason why it doesn't work is obvious.
The master MariaDB server and, by extension, Galera, do not update gtid_slave_pos when events are generated on that particular node. | ||||
| Comment by markus makela [ 2019-12-02 ] | ||||
|
This will be fixedby MDEV-18672. |