[Openstack] [Swift] Object expiration vs DELETE
Samuel Merritt
sam at swiftstack.com
Thu Oct 10 19:16:48 UTC 2013
On 10/10/13 11:12 AM, Shrinand Javadekar wrote:
> Thanks for the detailed reply Samuel.
>
> The architecture overview of Openstack Swift at [1] mentions: "A
> deletion is also treated as a version of the file (a 0 byte file ending
> with ”.ts”, which stands for tombstone)". That led me to think that an
> object delete is a new version created by truncating and then renaming
> the file.
The net effect upon the filesystem is the same, but the route taken to
get there is different.
> [snip]
> However, if the POST-as-copy option is disabled, setting the
> X-Delete-After results in making an entry in the .expiring_objects
> account and change the xattrs of the inode for that object. A DELETE
> request results in unlinking the file and creating a new one.
>
> Do the same set of operations happen for all the replicas of that object?
Yes, every replica gets updated.
Also, if you're setting X-Delete-At, all 3 replicas of the particular
container in .expiring_objects will get updated too.
> Thanks for pointing out that the "-m" option is only for metadata
> headers. Is there no way of directly setting this attribute using the
> swift command line client? Or should I just use curl?
There were some patches to the client that allowed that, but I'm not
sure if they've made it into a release or not.
I'd just use curl; that way, you know exactly what you send and what you
get back. There's no "helpful" behavior to confuse things.
More information about the Openstack
mailing list