1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

ctdb-tests: Minimise chances of test interfering with itself

Checking that the database contains 0 records cause a traverse.  This
may take a lock and cause vacuuming to fail (or be deferred for a
particular record/chain).  Minimise the chance of this happening by
only checking for 0 records every 10 seconds.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-12-18 14:31:24 +11:00 committed by Amitay Isaacs
parent f1b594dce1
commit 2e3ad8c20d

View File

@ -63,8 +63,9 @@ echo "Wait until vacuuming deletes the record on active nodes"
# 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
# If vacuuming is just missed then need an extra interval
t=$((vacuum_interval * 4))
wait_until "${t}/10" database_has_zero_records
echo "Continue node ${first}"
try_command_on_node $first $CTDB continue