diff --git a/reference/mysqlnd_ms/concepts.xml b/reference/mysqlnd_ms/concepts.xml index 24747c16b9..66c3c178b6 100755 --- a/reference/mysqlnd_ms/concepts.xml +++ b/reference/mysqlnd_ms/concepts.xml @@ -645,7 +645,8 @@ version = 5.6.2-m5-log
Failover - Connection failover handling is left to the user. The application is responsible + By default, connection failover handling is left to the user. + The application is responsible for checking return values of the database functions it calls and reacting to possible errors. If, for example, the plugin recognizes a query as a read-only query to be sent to the slave servers, and the slave server selected by the @@ -668,7 +669,10 @@ version = 5.6.2-m5-log A user that does not change the connection state after opening a connection - may activate automatic master failover. + may activate automatic failover. Please note, that automatic failover logic + is limited to connection attempts. Automatic failover is not used for already + established connections. There is no way to instruct the plugin to attempt + failover on a connection that has been connected to MySQL already in the past. The failover policy is configured in the plugins configuration file, by diff --git a/reference/mysqlnd_ms/setup.xml b/reference/mysqlnd_ms/setup.xml index 49e0b3e948..80c7f13c36 100755 --- a/reference/mysqlnd_ms/setup.xml +++ b/reference/mysqlnd_ms/setup.xml @@ -1468,7 +1468,7 @@ function pick_server($connected, $query, $masters, $slaves, $last_used_connectio If using failover=master the plugin will implicitly - failover to a slave, if available. Please check the + failover to a master, if available. Please check the concepts documentation to learn about potential pitfalls and risks of using failover=master. @@ -1497,6 +1497,14 @@ function pick_server($connected, $query, $masters, $slaves, $last_used_connectio + + Please note, the automatic failover logic is applied when opening + connections only. Once a connection has been opened no automatic attempts + are made to reopen it in case of an error. If, for example, the server + a connection is connected to is shut down and the user attempts to + run a statement on the connection, no automatic failover + will be tried. Instead, an error will be reported. + Setting failover to any other value but disabled or master will not