summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2018-03-29 21:28:33 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2018-04-03 07:23:39 +0000
commit277d3058a1b9fdd345b6712d84eb9fd9453dd9d6 (patch)
treec70c367dcdaa66b523df4e24e97bd85600fa39d3
parent64376e107733e129497cd200a69725c489e9b286 (diff)
cluster/afr: Prevent ping-event handling on shd
On shd, we shouldn't treat any brick down based on latency, otherwise self-heal will never happen fixes: bz#1562717 Change-Id: Ica07fcc4fae91a6bfd9c9a670e2be464704d94b7 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
-rw-r--r--xlators/cluster/afr/src/afr-common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 685a349ac49..caea2d35908 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -4859,6 +4859,8 @@ __afr_handle_ping_event (xlator_t *this, xlator_t *child_xlator,
priv->child_latency[idx] = child_latency_msec;
gf_msg_debug (child_xlator->name, 0, "Client ping @ %ld ms",
child_latency_msec);
+ if (priv->shd.iamshd)
+ return;
up_children = __afr_get_up_children_count (priv);