[sheepdog] [PATCH 9/9] sheep: show error message when object may be lost

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue May 7 08:53:12 CEST 2013


At Tue, 07 May 2013 14:05:05 +0800,
Liu Yuan wrote:
> 
> On 05/07/2013 01:45 AM, MORITA Kazutaka wrote:
> > From the point of view of block storage semantics, sheepdog must not show the
> > old data to clients.  If sheep may break the data consistency, sheep should
> > alert it so that users can know the problem.
> 
> Is this really true? For multiple node events, we have to rollback to
> the older epoch, but the data are fresh from the old epoch, no?

Here is a simple scenario where sheep can show the old data:

==
Epoch  Nodes
1      [A, B, C]           <- A, B, and C has the object X
2      [A, B, C, D]
3      [A, B, C, D, E]
4      [A, B, C, D, E, F]  <- The object X are copied to D, E, and F, and
                              it is updated from X to X' at this epoch
5      [A, B, C, D, E]
6      [A, B, C, D]
7      [A, B, C]           <- D, E, and F have gone away at the same time at epoch 4.
                              A, B, and C still have X and recover the object
                              to the working direcotry, but clients must see X'.
==

Currently, sheep rollbacks to the older epoch without considering the
consistency problem, so it can show the older data to clients.

In the initial sheepdog codes, we returned SD_RES_EIO to clients when
we cannot guarantee that the object is the latest one.  I'm not sure
which is the better approach now because the above example is unlikely
to happen and returning EIO can also stop VMs.  To make sheepdog
tolerant against rapid node changes, I have come to think that we
should accept the consistency problem and print the error message
instead.
		      
Thanks,

Kazutaka



More information about the sheepdog mailing list