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

@ -229,6 +229,7 @@ typedef struct rwsplit_config_st
* to the master after a multistatement query. */
enum failure_mode rw_master_failure_mode; /**< Master server failure handling mode.
* @see enum failure_mode */
bool rw_retry_failed_reads; /**< Retry failed reads on other servers */
} rwsplit_config_t;
#if defined(PREP_STMT_CACHING)