MXS-3487: Close old master connection
When a transaction migration starts, the old master must be unconditionally closed. This is the simplest way of resetting the connection state and it also helps close unused connections.
This commit is contained in:
parent
7643dd1445
commit
38cdade698
@ -359,6 +359,12 @@ bool RWSplitSession::route_single_stmt(GWBUF* querybuf)
|
||||
|
||||
if (!succp && should_migrate_trx(target))
|
||||
{
|
||||
if (m_current_master && m_current_master->in_use())
|
||||
{
|
||||
m_current_master->close();
|
||||
m_current_master->set_close_reason("The original master is not available");
|
||||
}
|
||||
|
||||
return start_trx_migration(target, querybuf);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user