Readwritesplit: Graceful maintenance mode
By allowing transactions to the master to end even if the server is in maintenance mode makes it possible to terminate connections at a known point. This helps prevent interrupted transactions which can help reduce errors that are visible to the clients.
This commit is contained in:
@ -395,7 +395,7 @@ static void log_server_connections(select_criteria_t criteria, const PRWBackends
|
||||
RWBackend* get_root_master(const PRWBackends& backends, RWBackend* current_master,
|
||||
const BackendSelectFunction& func)
|
||||
{
|
||||
if (current_master && current_master->in_use() && current_master->is_master())
|
||||
if (current_master && current_master->in_use() && can_continue_using_master(current_master))
|
||||
{
|
||||
return current_master;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user