At Fri, 30 Dec 2011 21:06:58 +0800, Liu Yuan wrote: > > From: Liu Yuan <tailai.ly at taobao.com> > > When the new node joins the cluster, it doesn't know what kind of > backend store the cluster uses, so we need to transfer this information > by master node in the join phase. > > Signed-off-by: Liu Yuan <tailai.ly at taobao.com> > --- > sheep/group.c | 13 ++++++++++++- > 1 files changed, 12 insertions(+), 1 deletions(-) > > diff --git a/sheep/group.c b/sheep/group.c > index 115c965..239f311 100644 > --- a/sheep/group.c > +++ b/sheep/group.c > @@ -27,6 +27,8 @@ > > static int cdrv_fd; > static struct coroutine *cdrv_co; > +extern struct store_driver *sd_store; > +extern char *obj_path; > > struct node { > struct sd_node ent; > @@ -44,7 +46,8 @@ struct join_message { > uint64_t ctime; > uint32_t result; > uint8_t inc_epoch; /* set non-zero when we increment epoch of all nodes */ > - uint8_t pad[3]; > + uint8_t store[10]; > + uint8_t pad[1]; I prefer simply adding "uint8_t store[16]". And, please increment SD_SHEEP_PROTO_VER because older sheeps cannot coexist after merging this patch. Thanks, Kazutaka |