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>
This commit is contained in:
parent
ea7e34f38c
commit
3f0c70f2d5
@ -622,6 +622,7 @@ typedef enum {
|
||||
GF_EVENT_PARENT_DOWN,
|
||||
GF_EVENT_VOLUME_BARRIER_OP,
|
||||
GF_EVENT_UPCALL,
|
||||
GF_EVENT_SOME_CHILD_DOWN,
|
||||
GF_EVENT_MAXVAL,
|
||||
} glusterfs_event_t;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user