<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/12 Liu Yuan <span dir="ltr"><<a href="mailto:namei.unix@gmail.com" target="_blank">namei.unix@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5">On Thu, Dec 12, 2013 at 06:15:54PM +0800, Robin Dong wrote:<br>
> From: Robin Dong <<a href="mailto:sanbai@taobao.com">sanbai@taobao.com</a>><br>
><br>
> The old implemention of kv can only support small object (< 4MB), so we<br>
> use hyper volume ( up to 16PB ) to support large number of big object and<br>
> add lock to avoid race condition.<br>
><br>
> After create a account, we will create a hyper volume vdi with the same name<br>
> and this vdi will stores inodes of buckets:<br>
><br>
> account vdi<br>
> +-----------+---+--------------------------+---+--------------------------+--<br>
> |name: coly |...|bucket_inode (name: jetta)|...|bucket_inode (name: volvo)|..<br>
> +-----------+---+--------------------------+---+--------------------------+--<br>
> | |<br>
> / |<br>
> bucket vdi / |<br>
> +-----------------+-------+ <-- |<br>
> |name: coly/jetta |.......| |<br>
> +-----------------+-------+ /<br>
> bucket vdi /<br>
> +-----------------+------+ <----<br>
> | name: coly/volvo|......|<br>
> +-----------------+------+<br>
><br>
> An account could stores number of "16PB / sizeof(struct bucket_inode)" buckets.<br>
><br>
> The buckets has two vdis: one called bucket-vdi (named as bucket) and another<br>
> called data-vdi (named as "bucket/allocator").The bucket-vdi stores inodes of<br>
> objects and data-vdi stores the data of these objects:<br>
><br>
><br>
> --------------------- kv_onode -----------------------<br>
> | |<br>
> bucket vdi v v<br>
> +-----------------+--+---------------------------+--------------------------+<br>
> |name: coly/fruit |..|kv_onode_hdr (name: banana)|onode_extent: start, count|<br>
> +-----------------+--+---------------------------+--------------------------+<br>
> /<br>
> /<br>
> ------------<br>
> /<br>
> data_vid v<br>
> +---------------------------+---+-----------------+<br>
> |name: coly/fruit/allocator |...| data |<br>
> +---------------------------+---+-----------------+<br>
><br>
> The total size of data for objects in one bucket could reach 16PB recently, we<br>
> will add multi-data-vdi support for bucket in the future.<br>
><br>
> TODO:<br>
> 1. add statistics for space in bytes for account/container.<br>
> 2. one bucket could use many hyper volumes to store data of objects.<br>
> 3. use kv_update_object() to upload large object parallely.<br>
<br>
</div></div>I have tried the following steps:<br>
<br>
1 create a user /yliu<br>
2 create a container /yliu/computer<br>
3 upload a 100M file A to /yliu/computer/test<br>
4 update the same file A again and it succeded<br>
<br>
Then I found 'vdi list'<br>
<br>
yliu@ubuntu-precise:~/sheepdog$ dog/dog vdi list<br>
Name Id Size Used Shared Creation time VDI id Copies Tag<br>
yliu/computer/allocator 0 16 PB 204 MB 0.0 MB 2013-12-12 19:18 9ddb4 6<br>
<br>
note that 204 MB, I think it should be 104 MB because I overwrite the A with the<br>
same size.<br>
<br>
5 delete the /yliu/computer/test<br>
<br>
yliu@ubuntu-precise:~/sheepdog$ dog/dog vdi list<br>
Name Id Size Used Shared Creation time VDI id Copies Tag<br>
yliu/computer/allocator 0 16 PB 104 MB 0.0 MB 2013-12-12 19:18 9ddb4 6<br>
<br>
Seems that I will have 100 MB never get released.<br>
<br>
yliu@ubuntu-precise:~/sheepdog$ curl -X GET <a href="http://localhost/v1/yliu/computer" target="_blank">http://localhost/v1/yliu/computer</a><br>
<br>
Says that I have no file in it!<br></blockquote><div><br></div><div>As the swift API doc (<a href="http://docs.openstack.org/api/openstack-object-storage/1.0/content/create-update-object.html">http://docs.openstack.org/api/openstack-object-storage/1.0/content/create-update-object.html</a>) says: the </div>
<div>second create operation is a update operation, but we will not support update in this patchset. And, if I return CONFLICT when</div><div>users want to create a object twice, that will not be consistent to swift API standard.</div>
<div><br></div><div>Any suggestion ?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Thanks<br>
<span class=""><font color="#888888">Yuan<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>--<br>Best Regard<br>Robin Dong
</div></div>