Merge branch '2.2' into develop
This commit is contained in:
@ -703,7 +703,7 @@ Default is `0`.
|
|||||||
|
|
||||||
With this configuration item it is specified in what circumstances MaxScale
|
With this configuration item it is specified in what circumstances MaxScale
|
||||||
should dump the last statements that a client sent. The allowed values are
|
should dump the last statements that a client sent. The allowed values are
|
||||||
`never, `on_error` and `on_close`. With `never` the statements are never
|
`never`, `on_error` and `on_close`. With `never` the statements are never
|
||||||
logged, with `on_error` they are logged if the client closes the connection
|
logged, with `on_error` they are logged if the client closes the connection
|
||||||
improperly, and with `on_close` they are always logged when a client session
|
improperly, and with `on_close` they are always logged when a client session
|
||||||
is closed.
|
is closed.
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# MariaDB MaxScale 2.2.10 Release Notes -- 2018-06-
|
# MariaDB MaxScale 2.2.10 Release Notes -- 2018-06-28
|
||||||
|
|
||||||
Release 2.2.10 is a GA release.
|
Release 2.2.10 is a GA release.
|
||||||
|
|
||||||
|
|||||||
@ -8,16 +8,6 @@ servers= server1,server2,server3,server4
|
|||||||
user=maxskysql
|
user=maxskysql
|
||||||
passwd= skysql
|
passwd= skysql
|
||||||
monitor_interval=1000
|
monitor_interval=1000
|
||||||
detect_standalone_master=true
|
|
||||||
failcount=1
|
|
||||||
allow_cluster_recovery=true
|
|
||||||
replication_user=repl
|
|
||||||
replication_password=repl
|
|
||||||
backend_connect_timeout=3
|
|
||||||
backend_read_timeout=3
|
|
||||||
backend_write_timeout=3
|
|
||||||
auto_failover=true
|
|
||||||
auto_rejoin=true
|
|
||||||
|
|
||||||
[RW Split Router]
|
[RW Split Router]
|
||||||
type=service
|
type=service
|
||||||
|
|||||||
@ -7,33 +7,24 @@
|
|||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
Mariadb_nodes::require_gtid(true);
|
|
||||||
TestConnections test(argc, argv);
|
TestConnections test(argc, argv);
|
||||||
|
|
||||||
// Check that master gets the slave status when set into read-only mode
|
// Check that master gets the slave status when set into read-only mode
|
||||||
test.tprintf("Set master into read-only mode");
|
test.tprintf("Set master into read-only mode");
|
||||||
test.repl->connect();
|
test.repl->connect();
|
||||||
execute_query(test.repl->nodes[0], "SET GLOBAL read_only=ON");
|
execute_query(test.repl->nodes[0], "SET GLOBAL read_only=ON");
|
||||||
sleep(10);
|
test.maxscales->wait_for_monitor();
|
||||||
test.tprintf("Check that the current master now has the slave label");
|
test.tprintf("Check that the current master now has the slave label");
|
||||||
test.check_log_err(0, "[Master, Running] -> [Running]", false);
|
test.check_log_err(0, "[Master, Running] -> [Running]", false);
|
||||||
test.check_log_err(0, "[Master, Running] -> [Slave, Running]", true);
|
test.check_log_err(0, "[Master, Running] -> [Slave, Running]", true);
|
||||||
execute_query(test.repl->nodes[0], "SET GLOBAL read_only=OFF");
|
|
||||||
sleep(5);
|
|
||||||
test.maxscales->ssh_node_f(0, true, "truncate -s 0 /var/log/maxscale/maxscale.log");
|
test.maxscales->ssh_node_f(0, true, "truncate -s 0 /var/log/maxscale/maxscale.log");
|
||||||
|
|
||||||
// Check that the Master and Slave status aren't both set
|
// Check that the Master and Slave status aren't both set
|
||||||
test.tprintf("Block master and wait for monitor to detect it.");
|
execute_query(test.repl->nodes[0], "SET GLOBAL read_only=OFF");
|
||||||
test.repl->block_node(0);
|
test.maxscales->wait_for_monitor();
|
||||||
sleep(10);
|
|
||||||
test.tprintf("Check that the new master doesn't have both slave and master labels");
|
test.tprintf("Check that the new master doesn't have both slave and master labels");
|
||||||
test.check_log_err(0, "[Slave, Running] -> [Master, Slave, Running]", false);
|
test.check_log_err(0, "[Slave, Running] -> [Master, Slave, Running]", false);
|
||||||
test.check_log_err(0, "[Slave, Running] -> [Master, Running]", true);
|
test.check_log_err(0, "[Slave, Running] -> [Master, Running]", true);
|
||||||
test.repl->unblock_node(0);
|
|
||||||
|
|
||||||
|
|
||||||
test.tprintf("Cleanup");
|
|
||||||
test.repl->execute_query_all_nodes( "STOP ALL SLAVES; RESET SLAVE ALL;");
|
|
||||||
test.repl->fix_replication();
|
|
||||||
return test.global_result;
|
return test.global_result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,7 +97,7 @@ bool Backend::execute_session_command()
|
|||||||
case MXS_COM_STMT_CLOSE:
|
case MXS_COM_STMT_CLOSE:
|
||||||
case MXS_COM_STMT_SEND_LONG_DATA:
|
case MXS_COM_STMT_SEND_LONG_DATA:
|
||||||
/** These commands do not generate responses */
|
/** These commands do not generate responses */
|
||||||
rval = Backend::write(buffer, NO_RESPONSE);
|
rval = write(buffer, NO_RESPONSE);
|
||||||
complete_session_command();
|
complete_session_command();
|
||||||
ss_dassert(!is_waiting_result());
|
ss_dassert(!is_waiting_result());
|
||||||
break;
|
break;
|
||||||
@ -113,7 +113,7 @@ bool Backend::execute_session_command()
|
|||||||
// TODO: Remove use of GWBUF_TYPE_SESCMD
|
// TODO: Remove use of GWBUF_TYPE_SESCMD
|
||||||
//Mark session command buffer, it triggers writing MySQL command to protocol
|
//Mark session command buffer, it triggers writing MySQL command to protocol
|
||||||
gwbuf_set_type(buffer, GWBUF_TYPE_SESCMD);
|
gwbuf_set_type(buffer, GWBUF_TYPE_SESCMD);
|
||||||
rval = Backend::write(buffer);
|
rval = write(buffer, EXPECT_RESPONSE);
|
||||||
ss_dassert(is_waiting_result());
|
ss_dassert(is_waiting_result());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -221,6 +221,7 @@ bool Backend::write(GWBUF* buffer, response_type type)
|
|||||||
|
|
||||||
bool Backend::auth(GWBUF* buffer)
|
bool Backend::auth(GWBUF* buffer)
|
||||||
{
|
{
|
||||||
|
ss_dassert(in_use());
|
||||||
bool rval = false;
|
bool rval = false;
|
||||||
|
|
||||||
if (m_dcb->func.auth(m_dcb, NULL, m_dcb->session, buffer) == 1)
|
if (m_dcb->func.auth(m_dcb, NULL, m_dcb->session, buffer) == 1)
|
||||||
@ -245,6 +246,7 @@ void Backend::store_command(GWBUF* buffer)
|
|||||||
|
|
||||||
bool Backend::write_stored_command()
|
bool Backend::write_stored_command()
|
||||||
{
|
{
|
||||||
|
ss_dassert(in_use());
|
||||||
bool rval = false;
|
bool rval = false;
|
||||||
|
|
||||||
if (m_pending_cmd.length())
|
if (m_pending_cmd.length())
|
||||||
|
|||||||
@ -745,9 +745,16 @@ SRWBackend RWSplitSession::handle_slave_is_target(uint8_t cmd, uint32_t stmt_id)
|
|||||||
ExecMap::iterator it = m_exec_map.find(stmt_id);
|
ExecMap::iterator it = m_exec_map.find(stmt_id);
|
||||||
|
|
||||||
if (it != m_exec_map.end())
|
if (it != m_exec_map.end())
|
||||||
|
{
|
||||||
|
if (it->second->in_use())
|
||||||
{
|
{
|
||||||
target = it->second;
|
target = it->second;
|
||||||
MXS_INFO("COM_STMT_FETCH on %s (%s)", target->name(), target->uri());
|
MXS_INFO("COM_STMT_FETCH on %s", target->uri());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MXS_INFO("Old target not in use, cannot proceed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -763,6 +770,7 @@ SRWBackend RWSplitSession::handle_slave_is_target(uint8_t cmd, uint32_t stmt_id)
|
|||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
atomic_add_uint64(&m_router->stats().n_slave, 1);
|
atomic_add_uint64(&m_router->stats().n_slave, 1);
|
||||||
|
ss_dassert(target->in_use());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user