diff options
author | Martin Schwenke <martin@meltin.net> | 2019-08-13 14:45:33 +1000 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-09-03 12:05:40 +0000 |
commit | 89b08e4fbcff70d2f4bb09aaae33fea9896fa06e (patch) | |
tree | 367a71741f275f40663d66b293eb6d5fecb66b9d /ctdb | |
parent | 4cbd3cd970a8f145a8b7f2b58734bfb69560298b (diff) | |
download | samba-89b08e4fbcff70d2f4bb09aaae33fea9896fa06e.tar.gz |
ctdb-tests: Clear deleted record via recovery instead of vacuuming
This test has been flapping because sometimes the record is not
vacuumed within the expected time period, perhaps even because the
check for the record can interfere with vacuuming. However, instead
of waiting for vacuuming the record can be cleared by doing a
recovery. This should be much more reliable.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14085
RN: Fix flapping CTDB tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Aug 21 13:06:57 UTC 2019 on sn-devel-184
(backported from commit 71ad473ba805abe23bbe6c1a1290612e448e73f3)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/tests/simple/69_recovery_resurrect_deleted.sh | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/ctdb/tests/simple/69_recovery_resurrect_deleted.sh b/ctdb/tests/simple/69_recovery_resurrect_deleted.sh index fa8a0dd0bbf..a9d6cd16772 100755 --- a/ctdb/tests/simple/69_recovery_resurrect_deleted.sh +++ b/ctdb/tests/simple/69_recovery_resurrect_deleted.sh @@ -57,17 +57,11 @@ database_has_zero_records () return 0 } -echo "Get vacuum interval" -try_command_on_node -v $second $CTDB getvar VacuumInterval -vacuum_interval="${out#* = }" - -echo "Wait until vacuuming deletes the record on active nodes" -# Why 4? Steps are: -# 1. Original node processes delete queue, asks lmaster to fetch -# 2. lmaster recoverd fetches -# 3. lmaster processes delete queue -# If vacuuming is just missed then need an extra interval. -wait_until $((vacuum_interval * 4)) database_has_zero_records +echo "Trigger a recovery" +try_command_on_node "$second" $CTDB recover + +echo "Checking that database has 0 records" +database_has_zero_records echo "Continue node ${first}" try_command_on_node $first $CTDB continue |