mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-19746: Galera test failures because of wsrep_slave_threads identification
Problem was that tests select INFORMATION_SCHEMA.PROCESSLIST processes from user system user and empty state. Thus, there is not clear state for slave threads. Changes: - Added new status variables that store current amount of applier threads (wsrep_applier_thread_count) and rollbacker threads (wsrep_rollbacker_thread_count). This will make clear how many slave threads of certain type there is. - Added THD state "wsrep applier idle" when applier slave thread is waiting for work. This makes finding slave/applier threads easier. - Added force-restart option for mtr to always restart servers between tests to avoid race on start of the test - Added wait_condition_with_debug to wait until the passed statement returns true, or the operation times out. If operation times out, the additional error statement will be executed Changes to be committed: new file: mysql-test/include/force_restart.inc new file: mysql-test/include/wait_condition_with_debug.inc modified: mysql-test/mysql-test-run.pl modified: mysql-test/suite/galera/disabled.def modified: mysql-test/suite/galera/r/MW-336.result modified: mysql-test/suite/galera/r/galera_kill_applier.result modified: mysql-test/suite/galera/r/galera_var_slave_threads.result new file: mysql-test/suite/galera/t/MW-336.cnf modified: mysql-test/suite/galera/t/MW-336.test modified: mysql-test/suite/galera/t/galera_kill_applier.test modified: mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test modified: mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test modified: mysql-test/suite/galera/t/galera_var_slave_threads.test modified: mysql-test/suite/wsrep/disabled.def modified: mysql-test/suite/wsrep/r/variables.result modified: mysql-test/suite/wsrep/t/variables.test modified: sql/mysqld.cc modified: sql/wsrep_mysqld.cc modified: sql/wsrep_mysqld.h modified: sql/wsrep_thd.cc modified: sql/wsrep_var.cc
This commit is contained in:
@ -22,6 +22,7 @@ CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*")
|
||||
# wsrep
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||
Variable_name Value
|
||||
wsrep_applier_thread_count #
|
||||
wsrep_apply_oooe #
|
||||
wsrep_apply_oool #
|
||||
wsrep_apply_window #
|
||||
@ -75,6 +76,7 @@ wsrep_repl_keys_bytes #
|
||||
wsrep_repl_other_bytes #
|
||||
wsrep_replicated #
|
||||
wsrep_replicated_bytes #
|
||||
wsrep_rollbacker_thread_count #
|
||||
wsrep_thread_count #
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
|
||||
Variable_name Value
|
||||
@ -132,7 +134,16 @@ 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.
|
||||
# Wait for applier thread to get created 1.
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||
VARIABLE_VALUE
|
||||
1
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
|
||||
VARIABLE_VALUE
|
||||
1
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
||||
VARIABLE_VALUE
|
||||
2
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
libgalera_smm.so
|
||||
@ -148,13 +159,19 @@ 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.
|
||||
# Wait for 9 applier threads to get created.
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
|
||||
VARIABLE_VALUE
|
||||
10
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
|
||||
VARIABLE_VALUE
|
||||
1
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
|
||||
VARIABLE_VALUE
|
||||
11
|
||||
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 wsrep_on=0;
|
||||
set wsrep_on=1;
|
||||
create user test@localhost;
|
||||
|
Reference in New Issue
Block a user