From 4a5d8f65b9b04385dcae8b16a650f4e8ed357f8b Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Tue, 22 Mar 2016 14:26:32 +0530 Subject: afr: Add throttled background client-side heals Backport of: http://review.gluster.org/13207 If a heal is needed after inode refresh (lookup, read_txn), launch it in the background instead of blocking the fop (that triggered refresh) until the heal happens. afr_replies_interpret() is modified such that the heal is launched only if atleast one sink brick is up. Max. no of heals that can happen in parallel is configurable via the 'background-self-heal-count' volume option. Any number greater than that is put in a wait queue whose length is configurable via 'heal-wait-queue-leng' volume option. If the wait queue is also full, further heals will be ignored. Default values: background-self-heal-count=8, heal-wait-queue-leng=128 Change-Id: I9a134b2c29d66b70b7b1278811bd504963aabacc BUG: 1313312 Signed-off-by: Ravishankar N Reviewed-on: http://review.gluster.org/13564 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- tests/bugs/replicate/bug-802417.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/bugs/replicate/bug-802417.t') diff --git a/tests/bugs/replicate/bug-802417.t b/tests/bugs/replicate/bug-802417.t index df989b1470b..c5ba98b65fd 100755 --- a/tests/bugs/replicate/bug-802417.t +++ b/tests/bugs/replicate/bug-802417.t @@ -32,7 +32,6 @@ TEST $CLI volume set $V0 performance.stat-prefetch off ## Make sure automatic self-heal doesn't perturb our results. TEST $CLI volume set $V0 cluster.self-heal-daemon off TEST $CLI volume set $V0 cluster.data-self-heal on -TEST $CLI volume set $V0 cluster.background-self-heal-count 0 ## Start volume and verify TEST $CLI volume start $V0; @@ -70,8 +69,8 @@ tgt_xattr_2="trusted.afr.${V0}-client-2" actual=$(afr_get_changelog_xattr $obs_path_0 $tgt_xattr_0) EXPECT "0x000000000000000000000000|^\$" echo $actual -actual=$(afr_get_changelog_xattr $obs_path_0 $tgt_xattr_1) -EXPECT "0x000000000000000000000000|^\$" echo $actual +EXPECT_WITHIN $HEAL_TIMEOUT "0x000000000000000000000000" \ +afr_get_changelog_xattr $obs_path_0 $tgt_xattr_1 actual=$(afr_get_changelog_xattr $obs_path_0 $tgt_xattr_2) EXPECT "0x000000030000000000000000" echo $actual -- cgit