[MXS-1244] MySQL monitor "detect_replication_lag=true" doesn't work with "mysql51_replication=true" Created: 2017-04-20 Updated: 2017-05-23 Resolved: 2017-04-21 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | mariadbmon |
| Affects Version/s: | 2.0.0 |
| Fix Version/s: | 2.0.6, 2.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Massimiliano Pinto (Inactive) | Assignee: | Massimiliano Pinto (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
The call to function set_master_heartbeat requires both arguments handle and root_master not to be null for being able to succeed. but handle->master is always null and there's no chance for set_master_heartbeat to create the database maxscale_schema and table replication_heartbeat. it seems an intrinsic bug of MaxScale not being able to cope detect_replication_lag=true when mysql51_replication=true. |
| Comments |
| Comment by Andrea Barbieri [ 2017-04-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
relevant snippets in /etc/maxscale.cnf
and entries in log file when starting the service:
and this is the show servers report:
the current topology is indeed:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrea Barbieri [ 2017-04-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I also find this intriguing
in this simple case it should be:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Massimiliano Pinto (Inactive) [ 2017-04-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I confirm that build_mysql51_replication_tree() routine doesn't set handle->master Additionally server's field "depth" is not set. Accordingly to MaxScale 2.0.5 code: https://github.com/mariadb-corporation/MaxScale/blob/2.0.5/server/modules/monitor/mysql_mon.c I tested a quick fix for the missing handle->master after line 578 MYSQL_MONITOR *handle = mon->handle; If you are able to recompile your maxscale code base you can give it a try. If not you might need to wait for a new 2.0 packages in the next days. Massimiliano | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrea Barbieri [ 2017-04-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have just done so earlier today.
and after restarting the maxscale service with the patched libmysqlmon.so.1.4.0 the show servers now reports:
Ideally to complete MariaDB 5.1 compatibility the server's field "depth" should be set depending on the role and cluster topology. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrea Barbieri [ 2017-04-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I also noticed when explicitly setting the parameter detect_stale_slave I experience the following error:
MySQL Monitor v2.x documentation seems to suggest it is a valid monitor section parameter. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Massimiliano Pinto (Inactive) [ 2017-04-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We added repl depth: https://github.com/mariadb-corporation/MaxScale/commit/e6b34ea85cb1bae47f51ac2c79129ea9b1910d13 Server 0x63e1c0 (server1) Server 0x63c6e0 (server3) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Massimiliano Pinto (Inactive) [ 2017-04-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Parameter 'detect_stale_slave' is missing in server/core/config.c. The fix is: "detect_stale_slave", after "detect_stale_master", static char *monitor_params[] = { ... "detect_replication_lag", "detect_stale_master", "detect_stale_slave", .... } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrea Barbieri [ 2017-04-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
confirmed, applied fix and now parameter detect_stale_slave is recognised in the monitor section. |