mariadb/scripts
Julius Goryavsky 807a71b443 MDEV-29909: SST fails when transferred data is larger than datadir space
This change adds new options for controlling the SST using
the mariabackup method, which in many cases will allow much
more effective management of the free space used during
the SST process.

Two new options have been added, which can be used in the
configuration file by placing them in the [sst] section:

1) The 'sstdir' option sets the path to the temporary directory
where the received files will be placed during the state
transfer process in SST using mariabackup. Before this
change, files were always written to a special directory
<datadir>/.sst, which created a problem if the storage
where datadir resides was close to full. Now, however,
it is possible to specify an arbitrary directory where
the system will place the files received during SST.

Attention! The directory specified with sstdir will be
deleted during the SST process – therefore, it cannot
be the datadir itself or any important user directory
containing valuable files! It must be a working temporary
directory that will be automatically removed by the system
at the end of SST.

The user can also set the special value sstdir='mktemp'.
In this case, the system will automatically create a working
directory for SST using the mktemp utility (possibly using
the tmpdir directory if it is specified in the configuration
file). This directory will be deleted after the SST is completed.

2) The 'cleaning' option allows controlling the timing of the
deletion of the current system state when SST is required.
Currently, as well as by default after this change, the
current state is deleted in parallel with the transfer of new
data during SST. This is optimal in terms of performance but
may cause problems if the storage where datadir resides has
little free space and the same storage is used for receiving
files – because the old files are not deleted immediately,
but only after some time.

If the user is interested in deleting the current state before
the start of SST, which allows freeing up space on the datadir
storage, they can now set the option cleaning='before', and the
current state will be deleted before SST starts. This may be
slower in terms of performance but frees up space, which can
be critical in some user scenarios.

On the other hand, the user can specify cleaning='after' –
in this case, the current state will be deleted only after
the successful completion of data transfer during SST. This
reduces performance and requires more free space but guarantees
that the current state will not be deleted on the node before
the successful completion of data transfer – which can critically
increase reliability in user scenarios where loss of state on
nodes due to a chain of failures during SST transfer creates
a risk of cluster degradation.

If the user specifies cleaning='parallel' or does not set any
value for this option, the system will operate as before –
deleting the current state in parallel with receiving new data.
This maximizes performance but requires large amounts of free
space in the location specified by sstdir and may result in
the loss of node state if data transfer during SST fails.
2025-09-10 19:12:02 +02:00
..
sys_schema MDEV-26114: Update Sys Schema README 2024-09-05 13:24:57 +10:00
CMakeLists.txt print_ddl_recovery_log.pl ; Print content of the ddl_recovery.log 2025-04-27 15:12:21 +03:00
comp_sql.c Merge 10.5 into 10.6 2022-07-01 15:24:50 +03:00
convert-debug-for-diff.sh MDEV-23697: bin/env perl -i -> bin/perl -i 2020-10-02 05:28:58 +02:00
dheadgen.pl BUG#25719975 SHEBANG HARD CODED AS /USR/BIN/PERL IN SCRIPTS, BREAKS ON FREEBSD 2017-03-28 13:22:32 +02:00
fill_help_tables.sql Update 10.5 HELP tables 2023-01-24 11:28:37 +11:00
galera_new_cluster.sh Revert "update galera_new_cluster to use environment file" 2023-08-08 15:46:39 +01:00
galera_recovery.sh Fix recovering state GTID in case log file contains non-text bytes - 2024-09-01 02:52:52 +02:00
maria_add_gis_sp.sql.in MDEV-19650: Privilege bug on MariaDB 10.4 2020-05-07 10:54:56 +02:00
mariadb-service-convert Merge 10.4 into 10.5 2023-01-13 10:18:30 +02:00
msql2mysql.sh Update FSF Address 2019-05-11 21:29:06 +03:00
mysql_config.pl.in Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
mysql_config.sh Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
mysql_convert_table_format.sh Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driver 2019-07-19 13:39:20 +03:00
mysql_find_rows.sh Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
mysql_fix_extensions.sh Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
mysql_install_db.sh Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
mysql_performance_tables.sql MDEV-28915: mysql_upgrade fails due to old_mode="", with "Cannot load from 2023-06-26 15:10:30 +05:30
mysql_secure_installation.sh Merge branch '10.5' into 10.6 2024-07-18 16:25:33 +02:00
mysql_setpermission.sh MDEV-31611: mariadb-setpermission - Can't use string as an ARRAY ref while strict refs in use 2023-11-23 08:50:57 +11:00
mysql_system_tables.sql Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
mysql_system_tables_data.sql Merge 10.5 into 10.6 2023-09-19 10:47:26 +03:00
mysql_system_tables_fix.sql Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
mysql_test_data_timezone.sql MDEV-23908: Implement SELECT ... OFFSET ... FETCH ... 2021-04-21 14:09:14 +03:00
mysql_test_db.sql Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
mysqlaccess.conf BUG#25719975 SHEBANG HARD CODED AS /USR/BIN/PERL IN SCRIPTS, BREAKS ON FREEBSD 2017-03-28 13:22:32 +02:00
mysqlaccess.sh Merge 10.5 into 10.6 2023-01-13 10:45:41 +02:00
mysqld_multi.sh Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
mysqld_safe.sh Merge branch '10.5' into '10.6' 2024-09-01 06:51:25 +02:00
mysqldumpslow.sh Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
mysqlhotcopy.sh Merge branch '10.4' into 10.5 2020-02-12 08:55:17 +01:00
mytop.sh MDEV-34604 mytop - fix specifying filters in .mytop 2024-07-17 14:19:53 +10:00
print_ddl_recovery_log.pl.in print_ddl_recovery_log.pl ; Print content of the ddl_recovery.log 2025-04-27 15:12:21 +03:00
wsrep_sst_backup.sh galera SST scripts: comments update 2024-09-15 06:08:03 +02:00
wsrep_sst_common.sh Continuation of previous FreeBSD-related fix for Galera SST scripts 2025-08-14 21:36:22 +02:00
wsrep_sst_mariabackup.sh MDEV-29909: SST fails when transferred data is larger than datadir space 2025-09-10 19:12:02 +02:00
wsrep_sst_mysqldump.sh Merge branch '10.5' into '10.6' 2025-04-15 01:49:48 +02:00
wsrep_sst_rsync.sh MDEV-34998 addendum: post-fix corrections for SST scripts 2025-04-14 18:20:25 +02:00