MXS-1356: Allow tee filter to be disabled at runtime

Disabling the tee filter at runtime is desirable for cases where the
branched service is not always needed. Migrations and pre-production
setups are one where changes to the branched service are expected and
splitting the queries would result in an error.
This commit is contained in:
Markus Mäkelä
2017-08-10 13:34:49 +03:00
parent 53bf21f785
commit b768d3ca76
5 changed files with 69 additions and 2 deletions

View File

@ -99,6 +99,23 @@ sessions that are connected using this username are replicated.
user=john
```
## Module commands
Read [Module Commands](../Reference/Module-Commands.md) documentation for
details about module commands.
The tee filter supports the following module commands.
### `tee disable [FILTER]`
This commmad disables a tee filter instance. A disabled tee filter will not send
any queries to the target service.
### `tee enable [FILTER]`
Enable a disabled tee filter. This resumes the sending of queries to the target
service.
## Examples
### Example 1 - Replicate all inserts into the orders table

View File

@ -59,6 +59,13 @@ The `match` and `exclude` parameters were changed to use PCRE2 syntax for the
regular expressions. The regular expression should be enclosed by slashes
e.g. `match=/select.*from.*test/`.
A tee filter instance can be disabled with the new `tee disable [FILTER]` and
`tee enable [FILTER]` module commands. Refer to the
[module command documentation](../Reference/Module-Commands.md) for more
details on module commands and the
[Tee Filter documentation](../Filters/Tee-Filter.md) for details on the tee
filter specific commands.
### Dbfwfilter
The `function` type rule will now match a query that does not use a function