Comments - Named Server Filter
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.
If you added
filters=NamedServerFilter
under the[Read-Write-Service]
section, that should already cause the filter to be linked to the service.The output of
maxctrl show filters
should have the number of queries that were diverted by the filter. If the number increases, you know the filter works. An alternative way is to enable the info level log by addinglog_info=true
under the[maxscale]
section and then looking at the log to see where the queries are routed.Hi Markus, thanks for the response.
There is no "number of diverted queries" counts in the output from maxctrl show filters.
It shows a table with the following rows:
Filter, Source, Module, Services, Parameters.
This is on v 6.4.0
Ah, that must be an oversight in the
show filters
output in MaxCtrl and it doesn't show the filter diagnostics: I opened MXS-4166 for it and it should be fixed for the next release.You can also access the information directly with
curl
:If you've created a new MaxCtrl user or changed the password of the admin user, replace the credentials in the command.
Lovely thank you, looks like that will tide me over to figure out why my filter isn't working.
Are the forward slashes still not compatible with NamedServerFilter when defining the match in the configuration file?
Still not getting anything diverted with various attempts. Trying to redirect anything SELECT-ing from tables starting with "Finished". ie: FinishedPieces or FinishedPacks.
I've tried the following based on this:
Note: i'm updating the filter from the web UI
What other conditions would prevent a filter / hint from being considered by the Read-Write-Service?
I tested the filter by creating it with GUI and using
match01=SELECT.*FinishedPacks
andtarget01=->master
and it appears to work correctly: