[sheepdog] [PATCH v2 08/11] group: add node to sockfd_cache as early as possible
Liu Yuan
namei.unix at gmail.com
Wed Sep 18 05:52:16 CEST 2013
On Wed, Sep 18, 2013 at 12:34:36AM +0900, Hitoshi Mitake wrote:
> At Sat, 14 Sep 2013 18:34:28 +0800,
> Liu Yuan wrote:
> >
> > get_vdis will try to connect to all the nodes include joining node, so before
> > calling get_vdis, we'd better add joining node in the sockfd cache. This is not
> > a fatal problem and sockfd cache can actually sort it out with the old code, but
> > this patch will safe us unnecessary revalidating node after grab failure.
> >
> > Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> > ---
> > sheep/group.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/sheep/group.c b/sheep/group.c
> > index 660fc5a..0b03150 100644
> > --- a/sheep/group.c
> > +++ b/sheep/group.c
> > @@ -633,6 +633,7 @@ static void update_cluster_info(const struct cluster_info *cinfo,
> >
> > if (node_is_local(joined))
> > sockfd_cache_add_group(nroot);
>
> We should add else here. If the joined node is local, the newly
> created connections will not be useful.
>
Yes for now, but the erasure code patch series I am currently working on will
need to add itself to the sockfd cache. So let's keep it as is in this patch.
Thanks
Yuan
More information about the sheepdog
mailing list