Add initial-timeout to SST
Bug #1292991 reported by
Raghavendra D Prabhu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Initial timeout to receive packets from donor, so that if donor dies somewhere in between, joiner doesn't hang.
tags: | added: sst xtrabackup |
To post a comment you must log in.
Set by default to 100 seconds, if set to 0, it is disabled. The timeout.
option will be sst-initial-
=== modified file 'scripts/ wsrep_sst_ xtrabackup- v2.sh' wsrep_sst_ xtrabackup- v2.sh 2014-03-09 14:03:38 +0000 wsrep_sst_ xtrabackup- v2.sh 2014-03-15 23:19:19 +0000 $(parse_ cnf sst inno-backup-opts "") $(parse_ cnf sst inno-apply-opts "") $(parse_ cnf sst inno-move-opts "") $(parse_ cnf sst sst-initial-timeout 100)
--- scripts/
+++ scripts/
@@ -299,6 +299,7 @@
iopts=
iapts=
impts=
+ stimeout=
}
get_stream()
@@ -453,9 +454,19 @@
{
local dir=$1
local msg=$2
+ local tmt=$3
pushd ${dir} 1>/dev/null
set +e
+
+ if [[ $tmt -gt 0 && -x `which timeout` ]];then
+ if timeout --help | grep -q -- '-k';then
+ tcmd="timeout -k $(( tmt+10 )) $tmt $tcmd"
+ else
+ tcmd="timeout $tmt $tcmd"
+ fi
+ fi
+
timeit "$msg" "$tcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )"
set -e
popd 1>/dev/null
@@ -713,7 +724,7 @@
STATDIR= $(mktemp -d) FILE="$ {STATDIR} /${INFO_ FILE}"
MAGIC_
- recv_joiner $STATDIR "${stagemsg}-gtid" 1
+ recv_joiner $STATDIR "${stagemsg}-gtid" 1 $stimeout
if ! ps -p ${WSREP_ SST_OPT_ PARENT} &>/dev/null
then
@@ -763,7 +774,7 @@
- recv_joiner $DATA "${stagemsg}-SST" 0
+ recv_joiner $DATA "${stagemsg}-SST" 0 0
get_proc