Maxscale 6, slave_conditions ignored ?

201 views
Skip to first unread message

Alexandre Centar

unread,
Sep 27, 2021, 5:15:41 AM9/27/21
to MaxScale
Hi, I experience a strange problem with maxscale 6. I have 1 master and multiple replicas, I did my setup to avoid any lagging replica by setting a very low max_slave_replication_lag, and it works great ! 

Until replication breaks (seconds_behind_master : null AND slave_sql_running : No). On my replica server I can clearly see a replication error, server is marked as unhealthy in maxscale, but even if I clearly stated 

master_conditions : running_slave,connected_slave 
slave_conditions : linked_master

in monitoring, the replica is kept in the pool and keeps accepting read queries. I tried all different configurations of master/slave_conditions, nothing changes this. The only way to exclude the broken replica is to set it to maintenance mode manually. 

Is it possible to detect a broken replication and automatically exclude any broken replica from read queries ?

Thanks, Alex

Markus Mäkelä

unread,
Sep 27, 2021, 5:30:06 AM9/27/21
to maxs...@googlegroups.com

Hi,

MaxScale should be able to detect broken replication and mark the server as broken. When this happens, the server should be in the Running state but not in the Slave, Running state. This means that routers like readwritesplit won't use it for reads but routers like readconnroute configured with router_options=running will still use it.

If you have a reproducible test case, I'd recommend opening a bug report on the MariaDB Jira under the MaxScale project.

Markus

--
You received this message because you are subscribed to the Google Groups "MaxScale" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxscale+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/maxscale/035ceb9c-2612-4c20-a8c7-0eddd2cc6219n%40googlegroups.com.
-- 
Markus Mäkelä, Senior Software Engineer
MariaDB Corporation

Alexandre Centar

unread,
Sep 27, 2021, 7:20:44 AM9/27/21
to MaxScale
Oh ! You nailed it :) It was router_options=running ! I replaced it with `slave` and no more reads. 

I was asserting that readconnroute would use the monitoring settings to select working replicas. Thanks a lot for such a quick and accurate response !

Rgds, Alex

Markus Mäkelä

unread,
Sep 27, 2021, 7:30:33 AM9/27/21
to maxs...@googlegroups.com

Hi,

It's good to hear that it turned out to be a simple configuration issue.

The default behavior of readconnroute can be somewhat counter-intuitive. I think we could improve that somehow, maybe by requiring that the router_options parameter is configured. This would mean the user has to choose which types of servers to use with it instead of using the default of router_options=running.

Markus

Alexandre Centar

unread,
Sep 27, 2021, 8:01:01 AM9/27/21
to MaxScale
Yes, I agree with you, I didn't expect readconnroute to override my global settings. Or maybe router_options=running should'nt be the default ? Just my humble opinion :p

Anyway, thanks for this amazing product. Maxscale saved our lives @ WeMoms :)

Reply all
Reply to author
Forward
0 new messages