From ff45fdac29937a1eef2d630c4b234864a717bb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 22 Nov 2024 15:31:48 +0200 Subject: [PATCH] MDEV-35440 : Protocol error warning in the galera_wsrep_schema_detached test Make sure that node_1 remains in primary view by increasing it's weight. Add suppression on expected warnings because we kill node_2. Signed-off-by: Julius Goryavsky --- .../r/galera_wsrep_schema_detached.result | 35 ++++++++++++++++--- .../t/galera_wsrep_schema_detached.test | 19 +++++++--- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_wsrep_schema_detached.result b/mysql-test/suite/galera/r/galera_wsrep_schema_detached.result index 493bf9d3cac..4667aa98ccc 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_schema_detached.result +++ b/mysql-test/suite/galera/r/galera_wsrep_schema_detached.result @@ -3,8 +3,9 @@ connection node_1; connection node_1; connection node_2; connection node_1; -call mtr.add_suppression("WSREP: async IST sender failed to serve.*"); +call mtr.add_suppression("WSREP:.*"); SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options; +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true;pc.weight=2'; connection node_2; SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address; SET GLOBAL WSREP_ON=0; @@ -17,11 +18,37 @@ EXPECT_1 SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members; EXPECT_2 2 -connection node_1; -SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true'; connection node_2; Killing server ... connection node_1; +SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; +EXPECT_0 +0 +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; +EXPECT_1 +1 +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster_members; +EXPECT_1 +1 connection node_2; connection node_1; -SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false'; +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false;pc.weight=1'; +SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; +EXPECT_0 +0 +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; +EXPECT_1 +1 +SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members; +EXPECT_2 +2 +connection node_2; +SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; +EXPECT_0 +0 +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; +EXPECT_1 +1 +SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members; +EXPECT_2 +2 diff --git a/mysql-test/suite/galera/t/galera_wsrep_schema_detached.test b/mysql-test/suite/galera/t/galera_wsrep_schema_detached.test index f67091a5fb9..cddf4d6315a 100644 --- a/mysql-test/suite/galera/t/galera_wsrep_schema_detached.test +++ b/mysql-test/suite/galera/t/galera_wsrep_schema_detached.test @@ -6,8 +6,9 @@ --source include/auto_increment_offset_save.inc --connection node_1 -call mtr.add_suppression("WSREP: async IST sender failed to serve.*"); +call mtr.add_suppression("WSREP:.*"); SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options; +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true;pc.weight=2'; --connection node_2 SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address; @@ -16,15 +17,15 @@ SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members; ---connection node_1 -SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true'; - --connection node_2 --source include/kill_galera.inc --connection node_1 --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' --source include/wait_condition.inc +SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster_members; --connection node_2 --source include/start_mysqld.inc @@ -33,7 +34,15 @@ SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true'; --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' --source include/wait_condition.inc -SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false'; +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false;pc.weight=1'; +SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; +SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members; + +--connection node_2 +SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; +SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members; # Cleanup --source include/auto_increment_offset_restore.inc