From fc214f0f90ab195b7542a18cc918db467f575b37 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Sat, 20 Dec 2014 12:22:02 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/9322 Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- xlators/cluster/dht/src/dht-common.c | 3 +++ 1 file changed, 3 insertions(+) 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: -- cgit