[MXS-332] Readwritesplit slave receiving alter requests Created: 2015-08-25 Updated: 2016-05-08 Resolved: 2016-05-08 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | galeramon, readwritesplit |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sam | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 6 |
||
| Attachments: |
|
| Description |
|
We are running into an issue where our application crashes when it attempts to create and update all of its initial tables. The crash is consistent, so we looked at the mysql logs and it shows that a slave is trying to alter a table: Is this correct behavior? |
| Comments |
| Comment by markus makela [ 2015-08-25 ] | ||
|
That does not seem like correct behavior. If you could attach your maxscale.cnf file and all possible log files we could analyze this problem. Also describe the backend servers you are using and which MySQL version they are. | ||
| Comment by Sam [ 2015-08-25 ] | ||
|
Attached are the log files from the maxscale proxy, mysql master, and mysql slave. The mysql servers are running on openvz containers. The host is CentOS 6.6 and the MySQL version is 5.6.15 | ||
| Comment by markus makela [ 2015-09-01 ] | ||
|
It seems you are using the galeramon instead of the mysqlmon module. This module is intended for Galera clusters and should not be used with regular master-slave clusters. Please try this again while using the mysqlmon module. Here is the documentation for the MySQL monitor module: https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Monitors/MySQL-Monitor.md If you are using a Galera cluster (which the trace log does suggest), then how do you define "slave" nodes? From the trace log we can see that MaxScale is routing the ALTER TABLE query properly:
The odd thing is that if you are using a regular Master-Slave configuration and a Galera monitor, you should not be able to connect because the monitor would not classify them as valid nodes. | ||
| Comment by Sam [ 2015-09-02 ] | ||
|
We do use a Galera cluster, so we followed this article to set up our config: https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale/maxscale-readwrite-splitting-with-galera-cluster/ The monitor chooses which nodes should be master or slave, and it seems to be fine for the most part. We just don't know why there is the consistent initial crash as noted in the logs. | ||
| Comment by Joffrey MICHAIE (Inactive) [ 2015-09-07 ] | ||
|
Hi, Galera uses special hooks for DDL statements. For that reason, the DDL query is written on the slave(s) general_log, while normal DML (insert/update/delete) are not written in there. As replication is synchronous, every write (DDL or DML) has to be run on all nodes. The behavior you see here, is that the ALTER TABLE has an extra logging in the general_log on slave(s). Is MySQL/MariaDB crashing, or is your application crashing ? If MySQL/MariaDB, can you please provide the error_log ? Thanks, | ||
| Comment by markus makela [ 2015-09-07 ] | ||
|
lrssp Can you confirm what is crashing? | ||
| Comment by Sam [ 2015-09-09 ] | ||
|
It is our application that is crashing. It does not crash with only one node in the MaxScale cluster, and it does not crash on an HAproxy cluster. | ||
| Comment by markus makela [ 2016-02-04 ] | ||
|
lrssp Can you try this with the 1.3.0-beta version of MaxScale? The packages can be found here: http://maxscale-jenkins.mariadb.com/ci-repository/1.3.0-beta-release1/mariadb-maxscale/ | ||
| Comment by markus makela [ 2016-03-23 ] | ||
|
Please try this with the 1.4.0-beta version. | ||
| Comment by markus makela [ 2016-05-08 ] | ||
|
Closing this as Not a Bug since MaxScale doesn't seem to be the cause for this. |