mirror of
https://github.com/samba-team/samba.git
synced 2025-02-01 05:47:28 +03:00
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>
This commit is contained in:
parent
4cbd3cd970
commit
89b08e4fbc
@ -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 "Trigger a recovery"
|
||||
try_command_on_node "$second" $CTDB recover
|
||||
|
||||
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 "Checking that database has 0 records"
|
||||
database_has_zero_records
|
||||
|
||||
echo "Continue node ${first}"
|
||||
try_command_on_node $first $CTDB continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user