mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
MDEV-35749: Add support for --use-memory option for SST with mariabackup
Mariabackup (mariadb-backup) supports the --use-memory option that sets the buffer pool size for innodb. However, current SST scripts do not use this option. This commit adds support for this option, the value for which can be specified via the "use_memory" parameter in the configuration file in the [sst], [mariabackup] or [xtrabackup] sections (supported only for compatibility with old configurations). In addition, if the innodb_buffer_pool_size option is specified in the user configuration (in the main server configuration sections) or passed to the SST scripts or the server via arguments, its value is also passed to mariadb-backup as the value for the --use-memory option. A new section name [mariabackup] has also been added, which can be used instead of the deprecated [xtrabackup] (the section name "mariabackup" was specified in the documentation, but was not actually supported by SST scripts before this commit).
This commit is contained in:
parent
24e5d56400
commit
fd9a11d8a5
5 changed files with 121 additions and 17 deletions
|
|
@ -0,0 +1,13 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
Cleaning var directory ...
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
include/assert_grep.inc [mariabackup: Using 128974848 bytes for buffer pool \(set by --use-memory parameter\)]
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth="root:"
|
||||
|
||||
[mariabackup]
|
||||
use_memory=123m
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_mariabackup.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_2
|
||||
|
||||
--echo Shutting down server ...
|
||||
--source include/shutdown_mysqld.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
|
||||
|
||||
#
|
||||
# Force SST
|
||||
#
|
||||
--echo Cleaning var directory ...
|
||||
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mysql
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data
|
||||
|
||||
--connection node_2
|
||||
|
||||
--echo Starting server ...
|
||||
let $restart_noprint=2;
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Confirm that IST did not take place
|
||||
--let $assert_text = mariabackup: Using 128974848 bytes for buffer pool \(set by --use-memory parameter\)
|
||||
--let $assert_select = mariabackup: Using 128974848 bytes for buffer pool \(set by --use-memory parameter\)
|
||||
--let $assert_count = 1
|
||||
--let $assert_file = $MYSQLTEST_VARDIR/mysqld.2/data/mariabackup.prepare.log
|
||||
--let $assert_only_after = Starting InnoDB instance for recovery
|
||||
--source include/assert_grep.inc
|
||||
|
||||
# Restore original auto_increment_offset values.
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
--source include/galera_end.inc
|
||||
Loading…
Add table
Add a link
Reference in a new issue