diff options
author | mkaruza <mario.karuza@galeracluster.com> | 2018-12-11 14:39:18 +0100 |
---|---|---|
committer | mkaruza <mario.karuza@galeracluster.com> | 2019-02-08 11:18:18 +0100 |
commit | accc7f6029a89ec079177b7aef1d153a23fa9561 (patch) | |
tree | 31ccc99185b1af1a0895acd79a2e7b5cf3b731e7 /scripts | |
parent | 26dcf102e3b29e4b038aba5ce49b11a1b5ee8390 (diff) | |
download | mariadb-git-accc7f6029a89ec079177b7aef1d153a23fa9561.tar.gz |
MDEV-18178 Galera test failure on galera_sst_rsync2
* Donor node will now provide binlog-index argument to wsrep_sst_rsync script if binlog is used.
* Write correct path and binlog file names into joiner binlog-index file
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/wsrep_sst_rsync.sh | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 1fecb6f09d9..6a71d7bbfb3 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -147,6 +147,7 @@ if ! [ -z $WSREP_SST_OPT_BINLOG_INDEX ] then BINLOG_INDEX_DIRNAME=$(dirname $WSREP_SST_OPT_BINLOG_INDEX) BINLOG_INDEX_FILENAME=$(basename $WSREP_SST_OPT_BINLOG_INDEX) + BINLOG_INDEX_FILENAME=${BINLOG_INDEX_FILENAME%.index}.index fi WSREP_LOG_DIR=${WSREP_LOG_DIR:-""} @@ -268,12 +269,12 @@ EOF OLD_PWD="$(pwd)" cd $BINLOG_DIRNAME - if ! [ -z $WSREP_SST_OPT_BINLOG_INDEX ] + if [ -z $WSREP_SST_OPT_BINLOG_INDEX ] then - binlog_files_full=$(tail -n $BINLOG_N_FILES ${BINLOG_FILENAME}.index) + binlog_files_full=$(tail -n $BINLOG_N_FILES ${BINLOG_FILENAME}.index) else - cd $BINLOG_INDEX_DIRNAME - binlog_files_full=$(tail -n $BINLOG_N_FILES ${BINLOG_INDEX_FILENAME}.index) + cd $BINLOG_INDEX_DIRNAME + binlog_files_full=$(tail -n $BINLOG_N_FILES ${BINLOG_INDEX_FILENAME}) fi cd $BINLOG_DIRNAME @@ -510,16 +511,16 @@ EOF # Clean up old binlog files first rm -f ${BINLOG_FILENAME}.* wsrep_log_info "Extracting binlog files:" - tar -xvf $BINLOG_TAR_FILE >&2 - for ii in $(ls -1 ${BINLOG_FILENAME}.*) - do - if ! [ -z $WSREP_SST_OPT_BINLOG_INDEX ] + tar -xvf $BINLOG_TAR_FILE >> _binlog_tmp_files_$! + while read bin_file; do + if [ -z $WSREP_SST_OPT_BINLOG_INDEX ] then - echo ${BINLOG_DIRNAME}/${ii} >> ${BINLOG_FILENAME}.index + echo ${BINLOG_DIRNAME}/${bin_file} >> ${BINLOG_FILENAME}.index else - echo ${BINLOG_DIRNAME}/${ii} >> ${BINLOG_INDEX_DIRNAME}/${BINLOG_INDEX_FILENAME}.index + echo ${BINLOG_DIRNAME}/${bin_file} >> ${BINLOG_INDEX_DIRNAME}/${BINLOG_INDEX_FILENAME} fi - done + done < _binlog_tmp_files_$! + rm -f _binlog_tmp_files_$! fi cd "$OLD_PWD" |