[sheepdog] [PATCH v4 06/10] sheep: fetch vdi copy list after sheep joins the cluster

levin li levin108 at gmail.com
Mon Aug 20 10:26:06 CEST 2012


On 2012年08月20日 16:03, MORITA Kazutaka wrote:
> At Mon, 20 Aug 2012 15:41:03 +0800,
> levin li wrote:
>>
>> On 2012年08月20日 13:15, MORITA Kazutaka wrote:
>>> At Thu,  9 Aug 2012 13:27:41 +0800,
>>> levin li wrote:
>>>>
>>>> From: levin li <xingke.lwp at taobao.com>
>>>>
>>>> The new joined node doesn't have the vdi copy list, or have
>>>> incomplete vdi copy list, so we need to fetch the copy list
>>>> data from other nodes
>>>
>>> It makes code complex to store the copy list in local store because
>>> it's difficult to keep consistency of the data.
>>>
>>> I'd suggest gathering both vid and copy list with SD_OP_READ_VDI
>>> requests at the same time.  Then we can remove this patch and simplify
>>> 5th patch a lot.
>>>
>>> Thanks,
>>>
>>> Kazutaka
>>>
>>
>> How about this:
>>
>> We don't store the VDI copy list locally, but read it from the local
>> VDI inode object when a node starts up, and in update_cluster_info()
>> we collect the entire VDI copy list from other nodes just as what
>> get_vdi_bitmap() does,
> 
> That's just what I meant.
> 
>> but a little different from get_vdi_bitmap(),
>> we can not make it perform asynchronously if the node needs recovery,
>> because we need the VDI copy list in recovery, the solution is that
>> in prepare_object_list() we make sheep sleeps until it find that the
>> get_vdi_copy_list() is finished.
> 
> Looks good.
> 
> However, I'm wondering if it's much easier to save the number of
> copies as an xattr of each object rather than managing the VDI copy
> list.  What do you think about it?
> 
> Thanks,
> 
> Kazutaka
> 

Saving nr_copies for each object as xattr seems more complicated, when an
object is migrated from one node to another, the xattr info of that object
is lost. Moreover, if we try to read an object in remote node, we can not
specify the copy number in read_object(), I think a copy list may be the
simplest way for this problem, what do you think about it?

thanks,

levin



More information about the sheepdog mailing list