summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAnoop C S <achiraya@redhat.com>2014-12-20 12:22:02 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-02-26 23:40:59 -0800
commitfc214f0f90ab195b7542a18cc918db467f575b37 (patch)
treeeaa10430a822c5b20f72b35cf87285b0f48f214c /xlators
parentf364d963b63a13979d07f7871a3c02b205e20bed (diff)
cluster/dht: Propagate an event only after hearing the same from all subvolumes
In dht_notify(), we propagate each event without checking whether all subvolumes have reported the same event earlier. As a result separate events are being forwarded for each dht-subvolume. This change is to make sure that we propagate a particular event only if all other subvolumes have already reported the same event once earlier. Change-Id: I6c73fa105e967f29648af9e2030f91a94f2df130 BUG: 1176543 Signed-off-by: Anoop C S <achiraya@redhat.com> Reviewed-on: http://review.gluster.org/9322 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 47e617230f9..96acebda37b 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -6126,6 +6126,9 @@ dht_notify (xlator_t *this, int event, void *data, ...)
}
UNLOCK (&conf->subvolume_lock);
+ for (i = 0; i < conf->subvolume_cnt; i++)
+ if (conf->last_event[i] != event)
+ event = GF_EVENT_CHILD_MODIFIED;
break;
case GF_EVENT_CHILD_CONNECTING: