[Sheepdog] How to look up objects in any case
morita.kazutaka at lab.ntt.co.jp
Sun Dec 13 19:39:20 CET 2009
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.
How about these changes? Any feedback is welcome.
More information about the sheepdog