summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2020-11-18 17:47:39 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2020-11-19 12:57:02 +0200
commitb10a87d6e7c2c0d472aa155c2a83e2353634fc3a (patch)
tree809cecd1856037f9f5cceb14c48fd23383820614
parent031e1427ed9a7b939323f353c7aa037b8a74247c (diff)
downloadmariadb-git-bb-10.4-galera-tests.tar.gz
MDEV-24097 node restart overlaps with earlier still ongoing SST processbb-10.4-galera-tests
In galera_3nodes.galera_safe_to_bootstrap node restart can happen too soon, when earlier SST joiner process is still active in the node. Similar issue may hurt other mtr tests as well, e.g. MENT-815 should be affected. This is second variant of fix for this issue. Here we only change rsync SST script to wait a little bit if lingering SST rsync is observed to be in execution. We assume that the previous mysqld and SST processes have been already signaled to abort during earlier stataup attempt. If other SST methods (than rsync) suffer from similar overlapping SST execution, they should be sorted out separately within each SST method handler scripts.
-rw-r--r--scripts/wsrep_sst_rsync.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index d42cf014009..809d3e81e16 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -401,6 +401,14 @@ then
MODULE="rsync_sst"
RSYNC_PID="$WSREP_SST_OPT_DATA/$MODULE.pid"
+ # give some time for lingering rsync from previous SST to complete
+ check_round=0
+ while check_pid $RSYNC_PID && [ $check_round -lt 10 ]
+ do
+ wsrep_log_info "lingering rsync daemon found at startup, waiting for it to exit"
+ check_round=$(( check_round + 1 ))
+ sleep 1
+ done
if check_pid $RSYNC_PID
then