mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV#6206: wsrep_slave_threads subtracts from max_connections
Decoupled wsrep thread count from connection count. By doing so, the number of wsrep threads (applier/rollbacker) would no longer affect the threads_connected status variable and thus maximum allowable user connections limit would be @@max_connections. Also introduced a new status variable 'wsrep_thread_count' to hold the number of wsrep applier/rollbacker threads. Added a test case.
This commit is contained in:
@ -11,4 +11,69 @@ SET SESSION wsrep_replicate_myisam= ON;
|
||||
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET GLOBAL wsrep_replicate_myisam= ON;
|
||||
SET GLOBAL wsrep_replicate_myisam= OFF;
|
||||
|
||||
#
|
||||
# MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
||||
#
|
||||
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'");
|
||||
call mtr.add_suppression("WSREP: Failed to get provider options");
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
none
|
||||
SELECT @@global.wsrep_slave_threads;
|
||||
@@global.wsrep_slave_threads
|
||||
1
|
||||
SELECT @@global.wsrep_cluster_address;
|
||||
@@global.wsrep_cluster_address
|
||||
|
||||
SHOW STATUS LIKE 'threads_connected';
|
||||
Variable_name Value
|
||||
Threads_connected 1
|
||||
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
Variable_name Value
|
||||
wsrep_thread_count 0
|
||||
|
||||
SET GLOBAL wsrep_provider= '/usr/lib/galera/libgalera_smm.so';
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
/usr/lib/galera/libgalera_smm.so
|
||||
SELECT @@global.wsrep_cluster_address;
|
||||
@@global.wsrep_cluster_address
|
||||
NULL
|
||||
SHOW STATUS LIKE 'threads_connected';
|
||||
Variable_name Value
|
||||
Threads_connected 1
|
||||
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
Variable_name Value
|
||||
wsrep_thread_count 0
|
||||
|
||||
# Setting wsrep_cluster_address triggers the creation of
|
||||
# applier/rollbacker threads.
|
||||
SET GLOBAL wsrep_cluster_address= 'gcomm://';
|
||||
# Wait for applier threads to get created.
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
/usr/lib/galera/libgalera_smm.so
|
||||
SELECT @@global.wsrep_cluster_address;
|
||||
@@global.wsrep_cluster_address
|
||||
gcomm://
|
||||
SHOW STATUS LIKE 'threads_connected';
|
||||
Variable_name Value
|
||||
Threads_connected 1
|
||||
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
Variable_name Value
|
||||
wsrep_thread_count 2
|
||||
|
||||
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
|
||||
SET GLOBAL wsrep_slave_threads= 10;
|
||||
# Wait for applier threads to get created.
|
||||
SHOW STATUS LIKE 'threads_connected';
|
||||
Variable_name Value
|
||||
Threads_connected 1
|
||||
SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
Variable_name Value
|
||||
wsrep_thread_count 11
|
||||
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
|
||||
SET GLOBAL wsrep_cluster_address= '';
|
||||
SET GLOBAL wsrep_provider= 'none';
|
||||
# End of test.
|
||||
|
Reference in New Issue
Block a user