summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSakshi Bansal <sabansal@redhat.com>2015-11-12 12:28:53 +0530
committerJeff Darcy <jdarcy@redhat.com>2015-11-16 05:43:15 -0800
commit3f0c70f2d56743707699f6a5b62a1c2c2d5c6f85 (patch)
tree4fd3fdbde4c1bb6754e6e720b82f55d79c632a34 /xlators
parentea7e34f38c97b471fee863fa749e1f0389c4b563 (diff)
afr: replica pair going offline does not require CHILD_MODIFIED event
As a part of CHILD_MODIFIED event DHT forgets the current layout and performs fresh lookup. However this is not required when a replica pair goes offline as the xattrs can be read from other replica pairs. Hence setting different event to handle replica pair going down. Change-Id: I5ede2a6398e63f34f89f9d3c9bc30598974402e3 BUG: 1281230 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/12573 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Susant Palai <spalai@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-common.c2
-rw-r--r--xlators/cluster/dht/src/dht-common.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 576199db137..dae1b9d8a48 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -3874,7 +3874,7 @@ afr_notify (xlator_t *this, int32_t event,
"All subvolumes are down. Going offline "
"until atleast one of them comes back up.");
} else {
- event = GF_EVENT_CHILD_MODIFIED;
+ event = GF_EVENT_SOME_CHILD_DOWN;
}
priv->last_event[idx] = event;
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 6af55d5d42e..982b155d57c 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -7658,6 +7658,12 @@ dht_notify (xlator_t *this, int event, void *data, ...)
break;
+ case GF_EVENT_SOME_CHILD_DOWN:
+ subvol = data;
+ propagate = 1;
+
+ break;
+
case GF_EVENT_CHILD_DOWN:
subvol = data;