Skip to content

Commit

Permalink
Merge pull request percona#2007 from kamil-holubicki/PXC-4393-8.4
Browse files Browse the repository at this point in the history
(8.4) PXC-4393: Error lost in wsrep_sst_xtrabackup_v2
  • Loading branch information
kamil-holubicki authored Jan 27, 2025
2 parents 050f2e8 + 62ee8f2 commit 2b45465
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions scripts/wsrep_sst_xtrabackup-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2099,13 +2099,22 @@ then
wsrep_log_error "****************************************************** "
do_exit=1
fi
if [[ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]]; then
wsrep_log_error "******************* FATAL ERROR ********************** "
wsrep_log_error "$tcmd finished with error: ${RC[1]}"
wsrep_log_error "Line $LINENO"
wsrep_log_error "****************************************************** "
do_exit=1
fi

# Now let's go through the rest of return codes and see if there were
# any errors in tcmd (it may be a pipeline of several commands)
for ecode in "${RC[@]:1}"; do
if [[ $ecode -ne 0 ]]; then
wsrep_log_error "******************* FATAL ERROR ********************** "
wsrep_log_error "${tcmd} finished with error codes: ${RC[@]:1}"
wsrep_log_error "Line $LINENO"
wsrep_log_error "****************************************************** "
do_exit=1

# All exit codes already printed out, no need to iterate more
break
fi
done

if [[ $do_exit -eq 1 ]]; then
exit 22
fi
Expand Down

0 comments on commit 2b45465

Please sign in to comment.