Skip to content

Commit

Permalink
Merge pull request #793 from codership/10.1-MDEV-15442
Browse files Browse the repository at this point in the history
MDEV-15442 xtrabackup-v2 SST donor stuck in DONOR/DESYNCED state when…
  • Loading branch information
Jan Lindström committed Jul 16, 2018
2 parents fe9f2f4 + 7a7a619 commit e08ddcc
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
23 changes: 22 additions & 1 deletion scripts/wsrep_sst_mariabackup.sh
Expand Up @@ -644,6 +644,27 @@ send_donor()

}

monitor_process()
{
local sst_stream_pid=$1

while true ; do

if ! ps --pid "${WSREP_SST_OPT_PARENT}" &>/dev/null; then
wsrep_log_error "Parent mysqld process (PID:${WSREP_SST_OPT_PARENT}) terminated unexpectedly."
kill -- -"${WSREP_SST_OPT_PARENT}"
exit 32
fi

if ! ps --pid "${sst_stream_pid}" &>/dev/null; then
break
fi

sleep 0.1

done
}

if [[ ! -x `which $INNOBACKUPEX_BIN` ]];then
wsrep_log_error "${INNOBACKUPEX_BIN} not in path: $PATH"
exit 2
Expand Down Expand Up @@ -932,7 +953,7 @@ then

MAGIC_FILE="${DATA}/${INFO_FILE}"
wsrep_log_info "Waiting for SST streaming to complete!"
wait $jpid
monitor_process $jpid

get_proc

Expand Down
2 changes: 2 additions & 0 deletions scripts/wsrep_sst_rsync.sh
Expand Up @@ -329,6 +329,8 @@ EOF
then
wsrep_log_error \
"Parent mysqld process (PID:$MYSQLD_PID) terminated unexpectedly."
kill -- -"${MYSQLD_PID}"
sleep 1
exit 32
fi

Expand Down
23 changes: 22 additions & 1 deletion scripts/wsrep_sst_xtrabackup-v2.sh
Expand Up @@ -801,6 +801,27 @@ check_for_version()
fi
}

monitor_process()
{
local sst_stream_pid=$1

while true ; do

if ! ps --pid "${WSREP_SST_OPT_PARENT}" &>/dev/null; then
wsrep_log_error "Parent mysqld process (PID:${WSREP_SST_OPT_PARENT}) terminated unexpectedly."
kill -- -"${WSREP_SST_OPT_PARENT}"
exit 32
fi

if ! ps --pid "${sst_stream_pid}" &>/dev/null; then
break
fi

sleep 0.1

done
}


if [[ ! -x `which $INNOBACKUPEX_BIN` ]];then
wsrep_log_error "innobackupex not in path: $PATH"
Expand Down Expand Up @@ -1102,7 +1123,7 @@ then

MAGIC_FILE="${DATA}/${INFO_FILE}"
wsrep_log_info "Waiting for SST streaming to complete!"
wait $jpid
monitor_process $jpid

get_proc

Expand Down

0 comments on commit e08ddcc

Please sign in to comment.