[Sheepdog] How to look up objects in any case

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Jan 7 18:37:23 CET 2010


Hi,

On Mon, Dec 14, 2009 at 3:39 AM, MORITA Kazutaka
<morita.kazutaka at lab.ntt.co.jp> wrote:
> Hi, all.
>
> I think of changing a object look up algorithm.
>
> Sheepdog uses consistent hashing algorithm to map objects to nodes.
> In most cases, sheepdog can find where objects are stored with hash
> function (SHA1). However, when the mapping is changed (because of node
> failure, adding new node, etc), how to find objects is a problem until
> objects are moved to right nodes based on a new object mapping.
>
> To deal with this problem, sheepdog vdi objects store 32-bit number
> for each data object. The number is the version of node membership (we
> call it `epoch') and it shows when the corresponding data object is
> last updated. If node membership has changed, sheepdog uses the past
> node membership to calculate where objects exist until the objects are
> moved to right nodes. But I think this is not good because it terribly
> complicates client block I/O codes in qemu/block/sheepdog.c.
>
> I think of using simpler approach; clients use current node membership
> in any case for calculating the target node, and if objects are not
> found there, sheepdog daemon forwards the request to other nodes.
> This removes epoch info from vdi objects, and this is key-value store
> manner more than current one.
>

The implementation is still on going, but you can see the progress
in the following branch:

git://sheepdog.git.sourceforge.net/gitroot/sheepdog/sheepdog next
git://sheepdog.git.sourceforge.net/gitroot/sheepdog/qemu-kvm next

The remaining work is
 - move objects when the node membership is changed
 - forward requests if object is not found

We'll finish these in the next week, but feedback is always welcome.

Kazutaka Morita



More information about the sheepdog mailing list