Debian Codegraph @

mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test

raw
1 #
2 # Attempt gcache recovery on a full gcache. Node will not be able to join via IST due to gcache rollover
3 #
4
5 --source include/galera_cluster.inc
6 --source include/have_innodb.inc
7 --source include/big_test.inc
8
9 SET SESSION wsrep_sync_wait = 0;
10 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
11
12 --connection node_2
13 SET SESSION wsrep_sync_wait = 0;
14 --source include/kill_galera.inc
15
16 --connection node_1
17
18 #
19 # Wait until the configuration change is over in order to avoid
20 # replication error due to configuration change.
21 #
22 --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
23 --source include/wait_condition.inc
24
25 INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
26 INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
27 INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
28 INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
29 INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
30 --source include/kill_galera.inc
31
32 --connection node_1
33 --let $galera_wsrep_recover_server_id=1
34 --source suite/galera/include/galera_wsrep_recover.inc
35
36 --let $_expect_file_name = $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
37 --source include/start_mysqld.inc
38 --connection node_2
39 --let $galera_wsrep_recover_server_id=2
40 --source suite/galera/include/galera_wsrep_recover.inc
41
42 --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
43 --source include/start_mysqld.inc
44
45 --connection node_1
46 --source include/wait_until_connected_again.inc
47 --source include/galera_wait_ready.inc
48 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
49
50 SELECT COUNT(*) FROM t1;
51
52 --connection node_2
53 SET SESSION wsrep_sync_wait = 15;
54 SELECT COUNT(*) FROM t1;
55
56 --let $diff_servers = 1 2
57 --source include/diff_servers.inc
58
59 --connection node_1
60 DROP TABLE t1;
61
62 # Warning always happens when the cluster is started for the first time
63 CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
64
65 # Confirm that IST did not take place
66 --let $assert_text = not found from cache, falling back to SST
67 --let $assert_select = not found from cache, falling back to SST
68 --let $assert_count = 1
69 --let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
70 --let $assert_only_after = starting as process
71 --source include/assert_grep.inc
72
73 --connection node_2
74 CALL mtr.add_suppression("Skipped GCache ring buffer recovery");