diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-02 14:15:39 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-02 14:15:39 +0200 |
commit | 48e35b8cf61cbedb515787762708afe7bd75386b (patch) | |
tree | 401ce3f31fcb689fb0c0a5aa2a6031d895b0d7cd /scripts | |
parent | 1ea5e402a89a1e3fb9ba8045e58570d23837714a (diff) | |
parent | 5ac528a91f2d8a3b84e83b434b08fa9dc428f80c (diff) | |
download | mariadb-git-48e35b8cf61cbedb515787762708afe7bd75386b.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/wsrep_sst_backup.sh | 2 | ||||
-rw-r--r-- | scripts/wsrep_sst_common.sh | 18 | ||||
-rw-r--r-- | scripts/wsrep_sst_mariabackup.sh | 15 | ||||
-rw-r--r-- | scripts/wsrep_sst_rsync.sh | 9 |
4 files changed, 34 insertions, 10 deletions
diff --git a/scripts/wsrep_sst_backup.sh b/scripts/wsrep_sst_backup.sh index 4f98ad41dd5..6f8c658135a 100644 --- a/scripts/wsrep_sst_backup.sh +++ b/scripts/wsrep_sst_backup.sh @@ -71,7 +71,7 @@ then # (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR # (c) ERROR file, in case flush tables operation failed. - while [ ! -r "$FLUSHED" ] && \ + while [ ! -r "$FLUSHED" ] || \ ! grep -q -F ':' -- "$FLUSHED" do # Check whether ERROR file exists. diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 44c6a7b4476..6a94cb0f706 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -104,6 +104,7 @@ WSREP_SST_OPT_HOST_UNESCAPED="" INNODB_DATA_HOME_DIR=$(trim_dir "${INNODB_DATA_HOME_DIR:-}") INNODB_LOG_GROUP_HOME=$(trim_dir "${INNODB_LOG_GROUP_HOME:-}") INNODB_UNDO_DIR=$(trim_dir "${INNODB_UNDO_DIR:-}") +INNODB_BUFFER_POOL="" INNODB_FORCE_RECOVERY="" INNOEXTRA="" @@ -212,6 +213,10 @@ case "$1" in readonly INNODB_UNDO_DIR=$(trim_dir "$2") shift ;; + '--innodb-buffer-pool-filename') + readonly INNODB_BUFFER_POOL=$(trim_string "$2") + shift + ;; '--defaults-file') readonly WSREP_SST_OPT_DEFAULT="$1=$2" readonly WSREP_SST_OPT_DEFAULTS="$1='$2'" @@ -471,6 +476,12 @@ case "$1" in fi skip_mysqld_arg=1 ;; + '--innodb-buffer-pool-filename') + if [ -z "$INNODB_BUFFER_POOL" ]; then + MYSQLD_OPT_INNODB_BUFFER_POOL=$(trim_string "$value") + fi + skip_mysqld_arg=1 + ;; '--innodb-force-recovery') if [ -n "$value" -a "$value" != "0" ]; then INNODB_FORCE_RECOVERY=$(trim_string "$value") @@ -552,6 +563,10 @@ if [ -n "${MYSQLD_OPT_INNODB_UNDO_DIR:-}" -a \ -z "$INNODB_UNDO_DIR" ]; then readonly INNODB_UNDO_DIR="$MYSQLD_OPT_INNODB_UNDO_DIR" fi +if [ -n "${MYSQLD_OPT_INNODB_BUFFER_POOL:-}" -a \ + -z "$INNODB_BUFFER_POOL" ]; then + readonly INNODB_BUFFER_POOL="$MYSQLD_OPT_INNODB_BUFFER_POOL" +fi if [ -n "${MYSQLD_OPT_LOG_BIN:-}" -a \ -z "$WSREP_SST_OPT_BINLOG" ]; then readonly WSREP_SST_OPT_BINLOG="$MYSQLD_OPT_LOG_BIN" @@ -602,6 +617,9 @@ fi if [ -n "$INNODB_UNDO_DIR" ]; then INNOEXTRA="$INNOEXTRA --innodb-undo-directory='$INNODB_UNDO_DIR'" fi +if [ -n "$INNODB_BUFFER_POOL" ]; then + INNOEXTRA="$INNOEXTRA --innodb-buffer-pool-filename='$INNODB_BUFFER_POOL'" +fi if [ -n "$WSREP_SST_OPT_BINLOG" ]; then INNOEXTRA="$INNOEXTRA --log-bin='$WSREP_SST_OPT_BINLOG'" if [ -n "$WSREP_SST_OPT_BINLOG_INDEX" ]; then diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 5521dd51098..63ef8be8690 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -664,6 +664,9 @@ cleanup_at_exit() local estatus=$? if [ $estatus -ne 0 ]; then wsrep_log_error "Cleanup after exit with status: $estatus" + elif [ -z "${coords:-}" -a "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then + estatus=32 + wsrep_log_error "Failed to get current position" fi [ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD" @@ -934,6 +937,11 @@ if [ $ssyslog -eq 1 ]; then logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" } + wsrep_log_warning() + { + logger -p daemon.warning -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" + } + wsrep_log_info() { logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" @@ -1015,7 +1023,7 @@ setup_commands() recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY" fi INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY" - INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts$INNOEXTRA --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" + INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts$INNOEXTRA --galera-info --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE" INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts$tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP" } @@ -1153,11 +1161,6 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then iopts="--parallel=$backup_threads${iopts:+ }$iopts" fi - max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs') - if [ -n "$max_binlogs" ]; then - iopts="--sst-max-binlogs=$max_binlogs${iopts:+ }$iopts" - fi - setup_commands set +e diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 7096bb4b330..ddf41559c29 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -38,6 +38,9 @@ cleanup_joiner() local estatus=$? if [ $estatus -ne 0 ]; then wsrep_log_error "Cleanup after exit with status: $estatus" + elif [ -z "${coords:-}" ]; then + estatus=32 + wsrep_log_error "Failed to get current position" fi local failure=0 @@ -408,7 +411,7 @@ EOF # (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR # (c) ERROR file, in case flush tables operation failed. - while [ ! -r "$FLUSHED" ] && \ + while [ ! -r "$FLUSHED" ] || \ ! grep -q -F ':' -- "$FLUSHED" do # Check whether ERROR file exists. @@ -433,8 +436,8 @@ EOF # Let's check the existence of the file with the index: if [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ]; then # Let's read the binlog index: - max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs') - if [ -n "$max_binlogs" ]; then + max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs' 1) + if [ $max_binlogs -ge 0 ]; then binlog_files="" if [ $max_binlogs -gt 0 ]; then binlog_files=$(tail -n $max_binlogs \ |