[sheepdog] [PATCH] sheep: fix explanation of SD_RES_OLD_NODE_VER and SD_RES_NEW_NODE_VER
MORITA Kazutaka
morita.kazutaka at gmail.com
Fri Jun 7 06:33:45 CEST 2013
At Fri, 07 Jun 2013 12:27:35 +0800,
Liu Yuan wrote:
>
> On 06/07/2013 11:32 AM, MORITA Kazutaka wrote:
> > From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> >
> > Sheep returns SD_RES_OLD_NODE_VER when the sent request contains an
> > older epoch, and SD_RES_NEW_NODE_VER when it contains an newer one.
> >
> > Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> > ---
> > include/internal_proto.h | 4 ++--
> > include/sheep.h | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/internal_proto.h b/include/internal_proto.h
> > index bddb5dc..24d5519 100644
> > --- a/include/internal_proto.h
> > +++ b/include/internal_proto.h
> > @@ -85,8 +85,8 @@
> > #define SD_FLAG_CMD_DEL 0x0400
> >
> > /* internal error return values, must be above 0x80 */
> > -#define SD_RES_OLD_NODE_VER 0x81 /* Remote node has an old epoch */
> > -#define SD_RES_NEW_NODE_VER 0x82 /* Remote node has a new epoch */
> > +#define SD_RES_OLD_NODE_VER 0x81 /* Request has an old epoch */
> > +#define SD_RES_NEW_NODE_VER 0x82 /* Request has a new epoch */
> > #define SD_RES_NOT_FORMATTED 0x83 /* Sheepdog is not formatted yet */
> > #define SD_RES_INVALID_CTIME 0x84 /* Creation time of sheepdog is different */
> > #define SD_RES_INVALID_EPOCH 0x85 /* Invalid epoch */
> > diff --git a/include/sheep.h b/include/sheep.h
> > index e917064..0d3fae4 100644
> > --- a/include/sheep.h
> > +++ b/include/sheep.h
> > @@ -206,8 +206,8 @@ static inline const char *sd_strerror(int err)
> > [SD_RES_READONLY] = "Object is read-only",
> >
> > /* from internal_proto.h */
> > - [SD_RES_OLD_NODE_VER] = "Remote node has an old epoch",
> > - [SD_RES_NEW_NODE_VER] = "Remote node has a new epoch",
> > + [SD_RES_OLD_NODE_VER] = "Request has an old epoch",
> > + [SD_RES_NEW_NODE_VER] = "Request has a new epoch",
> > [SD_RES_NOT_FORMATTED] = "Cluster has not been formatted",
> > [SD_RES_INVALID_CTIME] = "Creation times differ",
> > [SD_RES_INVALID_EPOCH] = "Invalid epoch",
> >
>
> This isn't a fix. Just switch the view from remote to request sender.
> Seems not necessary to me.
But we see "Remote node has an old epoch" in sheep.log even though the
local node has an old epoch actually. It's confusing.
Thanks,
Kazutaka
More information about the sheepdog
mailing list