summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2018-03-29 21:28:33 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-04-09 12:48:51 +0000
commitaf31a3d7a1367acadc341ab37ae211a7fa3ae3c6 (patch)
tree691619ef648a39ce28827e1bac31fbb7a3a78e18
parent2f127cb64e0cc8e4c4ce2961757abbf9e92a2df8 (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#1562728 Change-Id: Ica07fcc4fae91a6bfd9c9a670e2be464704d94b7 BUG: 1562728 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 ea3df12..d4102ca 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -4972,6 +4972,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);