MXS-756: Retry reads on slave failure

If a slave fails while a non-critical read is being executed, the read is
retried on a different server. This is controlled by the new
`retry_failed_reads` option.

Only selects done that are done outside of a transaction and with
autocommit enabled are retried.
This commit is contained in:
Markus Makela
2016-12-06 00:32:40 +02:00
parent a66c8fb919
commit 7a04259fc0
5 changed files with 102 additions and 16 deletions

View File

@ -148,6 +148,16 @@ as slave servers are available.
to the master is lost, clients will not be able to execute write queries without
reconnecting to MariaDB MaxScale once a new master is available.
### `retry_failed_reads`
This option controls whether autocommit selects are retried in case of
failure. This option is enabled by default.
When a simple autocommit select is being executed outside of a transaction
and the slave server where the query is being executed fails,
readwritesplit can retry the read on a replacement server. This makes the
failure of a slave transparent to the client.
## Routing hints
The readwritesplit router supports routing hints. For a detailed guide on hint