[Sheepdog] sheepdog's recovery alogorithm questions

jidalyg_8711 jidalyg_8711 at 163.com
Wed Mar 16 03:52:18 CET 2011

Thanks for your replies!
Another questions:
1. write_object() return's value always >= 0
   but when you call the write_object, you think an error happened if ret < 0
   for example in vdi.c  
if (ret < 0)
I think this is bug ,because return values is impossible < 0, and can't get error of the write_object.



发件人: MORITA Kazutaka 
发送时间: 2011-03-15  18:14:21 
收件人: jidalyg_8711 
抄送: sheepdog 
主题: Re: [Sheepdog] sheepdog's recovery alogorithm questions 
On Tue, Mar 15, 2011 at 12:09 PM, jidalyg_8711 <jidalyg_8711 at 163.com> wrote:
> 1. sheepdog claim it is strong consistent, And I think the implemention of
> the read_object() write_object() remove_object()  ensure that strong
> consistent?  any other places to ensure it ?   How about it affect the
> performance of the sheepdog?
The mechanism to ensure data consistency are:
- Sheepdog stores objects in the epoch number directory, and doesn't
  allow clients to read objects from old epoch number directories.
  This prevents clients from reading old data which are not
- Sheepdog allows write requests from at most one client.
  Administrators need to pay attention for this when using Sheepdog.
  This avoids write conflicts and ensures object consistency easily.
> 2. About the recovery alogorithm, When the new node join  or the node
> left,  sheepdog will call start_recovery()func and recovery in background.
> The main actions of the recovery is move the object to the new node and the
> epoch directory ; while recoverying, the READ_OBJECT request arrived,
> currently sys->epoch has increased, but the object maybe still in old epoch
> directory ,not yet move to the new epoch, How the sheepdog handle the
> situation ?  And the sys->epoch increased in update_cluster_status()
> before calling start_recovery()
Before processing the object request, Sheepdog checks whether the
requesting object is recovered to the current epoch directory or not
in is_recoverying_oid().  If the object is not recovered yet, Sheepdog
recovers the object first, and after that, processes the request.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20110316/2ea155ac/attachment-0003.html>

More information about the sheepdog mailing list