Commit 59e14b96 authored by Jan Lindström's avatar Jan Lindström

MDEV-21189: Dropping partition with 'wsrep_OSU_method=RSU' and 'SESSION...

MDEV-21189: Dropping partition with 'wsrep_OSU_method=RSU' and 'SESSION sql_log_bin = 0' cases the galera node to hang

Found two bugs

(1) have_committing_connections was missing mutex unlock on one
exit case. As this function is called on a loop it caused mutex
lock when we already owned the mutex. This could cause hang.

(2) wsrep_RSU_begin did set up error code when partition to
be dropped could not be MDL-locked because of concurrent
operations but wrong error code was propagated to upper layer
causing error to be ignored. This could have also caused
the hang.
parent fd1979bc
......@@ -16,6 +16,7 @@ wsrep-sync-wait=15
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
......@@ -25,6 +26,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
......@@ -35,6 +37,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
......@@ -45,6 +48,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
......
This diff is collapsed.
!include ../galera_4nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
[mysqld.3]
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2'
wsrep_slave_threads=10
[mysqld.4]
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3'
wsrep_slave_threads=10
This diff is collapsed.
......@@ -1784,7 +1784,7 @@ static int wsrep_RSU_begin(THD *thd, char *db_, char *table_)
}
my_error(ER_LOCK_DEADLOCK, MYF(0));
return(1);
return(-1);
}
wsrep_seqno_t seqno = wsrep->pause(wsrep);
......@@ -2311,6 +2311,7 @@ static my_bool have_committing_connections()
if (is_committing_connection(tmp))
{
mysql_mutex_unlock(&LOCK_thread_count);
return TRUE;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment