[sheepdog] [PATCH v3 5/6] sheep/http: allow 'Forced: true' http header to delete 'incompleted' object forcely

Liu Yuan namei.unix at gmail.com
Tue Feb 25 10:21:25 CET 2014


On Tue, Feb 25, 2014 at 03:59:30PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai at taobao.com>
> 
> Imaging a scenario:
> 
> 1. Client A is uploading a large object which names 'elephant', it
>    only allocate meta-data in oalloc and is creating SD_OBJ_DATA files.
> 2. Client B send a DELETE request to remove object 'elephant', it
>    will remove all the backend files for 'elephant'.
>    At the same time, Client A dosen't know what happend because uploading
>    progress don't need to lock any vdi.
> 3. Client A return Create-object-success, but the real data have all been
>    removed.
> 
> To avoid this scenario, we let DELETE operation do nothing but only return
> 'CONFLICT' when the object is 'incompleted'. And, users can send the DELETE
> request with a new header 'Forced: true' which will remove 'incompleted'
> object forcely when users make sure that there isn't any uploading progress
> for this object.

I think 'Force: true' is more intuitive for users, if you agree, I can change
it for you before applying the patch.

Thanks
Yuan



More information about the sheepdog mailing list