Comments - MaxScale Hint Syntax

7 years, 2 months ago Morten Berg

We have a setup where we want to write to tables on the slave (these tables have replicate ignore). It seems that maxscale ignores hint to slave servers when the sql command is a write operation? Is this true or is there another way?

 
7 years, 2 months ago Markus Mäkelä

In 1.4 the hints can only alter the query in a way that doesn't conflict with the requirements the router imposes. This restriction was lifted in 2.0 which prioritizes routing hints over the decision made by the router.

What this means in practice is that in 2.0 hints would allow you to write to slave servers.

 
7 years, 2 months ago Morten Berg

Thanks we will look into that :-)

 
7 years, 2 months ago Morten Berg

We tried instead to use readconnroute instead of readwritesplit service. But here hint seems to not work at all? Even hint select statement to different slaves is not working?

 
7 years, 2 months ago Markus Mäkelä

The readconnroute will only use one server for the duration of the client session. It ignores hints in queries as it can only route to a single server.

 
7 years, 2 months ago Morten Berg

Thanks for the feedback. I will suggest that you change the first example in this document since it use the readconnroute service.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.