[Sheepdog] [PATCH 2/2] sheep: don't skip notify event
MORITA Kazutaka
morita.kazutaka at gmail.com
Sat Mar 31 12:20:26 CEST 2012
At Sat, 31 Mar 2012 16:55:41 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan <tailai.ly at taobao.com>
>
> We need to handle notify event firstly because during shutdown operation,
> in a large set of nodes, some nodes that are shut-down will be mistaken
> as a leave events and broadcasts to other nodes where the notify of shutdown
> is delayed, thus cause those nodes to perform recovery process improperly.
>
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
> sheep/group.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/sheep/group.c b/sheep/group.c
> index a4ddc73..6aec105 100644
> --- a/sheep/group.c
> +++ b/sheep/group.c
> @@ -1084,8 +1084,12 @@ do_retry:
> struct request *req = container_of(cevent, struct request, cev);
> struct sd_obj_req *hdr = (struct sd_obj_req *)&req->rq;
>
> + /* we need to handle notify event firstly
> + * since it may has shutdown cluster command or some nodes may
> + * take nodes that being shutdowned as left ones
> + */
> if (cevent->ctype == CPG_EVENT_NOTIFY)
> - continue;
> + break;
This change means that all notify events (e.g. vdi creation) block
membership change events. I think it is not good to block them so
long time.
However, as you say, we need to order the shutdown event with
membership change ones. Currently, I don't have a better idea, so it
is okay to me to merge this patch, but, if possible, I'd like to see a
better fix for it.
Thanks,
Kazutaka
> if (is_membership_change_event(cevent->ctype))
> break;
>
> --
> 1.7.8.2
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
More information about the sheepdog
mailing list